Hi all,
Recently we encounter an build issue, that is edk2 RISC-V binary which built from the latest RISC-V toolchain has problem to boot system. The root cause was found by Mark from Redhat, which is the CONSTs are put into .sdata2 section, this ends up the relocation could not be fixed up correctly using edk2 build tool. Is there any link option can force CONST to not staying with special section or can we force CONSTs to be in .text section?
Thanks
Abner
.text
.data
.sdata
.sdata2
.rodata
.rodata2 ?
.bss
.sbss
.sbss2
.heap
.stack
.init
.fini
.ctors
.dtors
.eh_frame
.got
.got2--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/e90446cb-24f8-4be2-9cfe-b9fa74d2db74%40groups.riscv.org.
Of course, your question doesn’t illuminate the real problem you’re trying to solve...
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/d637ffd3-8928-4677-a554-76fb6c063034%40groups.riscv.org.
Invoking: GNU RISC-V Cross Print Sizeriscv64-unknown-elf-size --format=sysv --radix=16 "UC_20.elf"UC_20.elf :section size addr.text 0xa560 0x8000000.ram_code 0x68 0x1001c00.sdata2._global_impure_ptr 0x8 0x1001c68.sdata 0x60 0x800a5d0.data 0xf60 0x800a630.sbss 0x50 0x800b590.bss 0x550 0x800b5e0.heap 0x1000 0x800bb30.stack 0x1400 0x800d000.debug_info 0x21ef27 0x0.debug_abbrev 0x44bf 0x0.debug_aranges 0x28b0 0x0.debug_ranges 0x27a0 0x0.debug_macro 0xe527 0x0.debug_line 0x1c9f9 0x0.debug_str 0x4f995 0x0.comment 0x51 0x0.riscv.attributes 0x35 0x0.debug_frame 0x7dc0 0x0Total 0x2b8a61Invoking: GNU RISC-V Cross Print Size
riscv64-unknown-elf-size --format=sysv --radix=16 "UC_20.elf"
UC_20.elf :
section size addr
.text 0xa730 0x8000000
.ram_code 0x68 0x1001c00
.sdata 0x70 0x800a7a0
.data 0xf60 0x800a810
.sbss 0x50 0x800b770
.bss 0x550 0x800b7c0
.heap 0x1000 0x800bd10
.stack 0x1400 0x800d000
.debug_info 0x1fad32 0x0
.debug_abbrev 0x3ebb 0x0
.debug_aranges 0x28b0 0x0
.debug_ranges 0x27a0 0x0
.debug_macro 0xe482 0x0
.debug_line 0x16586 0x0
.debug_str 0x4f86b 0x0
.comment 0x58 0x0
.debug_frame 0x6d40 0x0
Total 0x28cd50--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/ac3e17b9-a589-44c0-80eb-4dee94cc386a%40groups.riscv.org.
Yes, that is a bug in the RISC-V gcc port. We need to define
TARGET_ASM_UNIQUE_SECTION to do the right thing for RISC-V. No it
isn't fixed yet. There are far more problems to fix than I can fix by
myself. I started on a patch once but never had a chance to finish
it.
Jim
My experience maybe not helpful on this matter, but what I would like to share is .sdata2 section wasn’t existing once I set –msall-data-limit=0 to not allowing section for the small data.
Yes, this is not happened in earlier version of gcc.
From: Tommy Murphy [mailto:tommy_...@hotmail.com]
Sent: Friday, April 24, 2020 3:59 AM
To: RISC-V SW Dev <sw-...@groups.riscv.org>
Cc: tommy_...@hotmail.com; Chang, Abner (HPS SW/FW Technologist) <abner...@hpe.com>; ma...@wdc.com
Subject: Re: [sw-dev] .sdata2/.sbss2 section generated by toolchain
On Thursday, 23 April 2020 18:41:23 UTC+1, Jim Wilson wrote:
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
sw-dev+un...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/6c587f0d-ba94-4eef-b097-d44bda69d4bd%40groups.riscv.org.
My experience maybe not helpful on this matter, but what I would like to share is .sdata2 section wasn’t existing once I set –msall-data-limit=0 to not allowing section for the small data.
Yes, this is not happened in earlier version of gcc.