https://sourceware.org/bugzilla/show_bug.cgi?id=19152
Bug ID: 19152
Summary: --gc-sections changes scope from global to local for
--defysm or PROVIDE()
Product: binutils
Version: 2.23
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: [email protected]
Target Milestone: ---
$ cat test.s
.extern _start_ramcode
.text
.global init
init:
call _start_ramcode
$ gcc -c test.s -o test.o
$ ld --defsym _start_ramcode=etext -e init test.o -o test
$ nm test
000000000060007d T __bss_start
000000000060007d T _edata
0000000000600080 T _end
000000000040007d A _start_ramcode
000000000040007d T etext
0000000000400078 T init
$ ld --defsym _start_ramcode=etext -e init test.o -o test --gc-sections
$ nm test
000000000060007d t __bss_start
000000000060007d t _edata
0000000000600080 t _end
000000000040007d A _start_ramcode
000000000040007d t etext
0000000000400078 T init
GNU ld (GNU Binutils) 2.23.2
I would need _start_ramcode to remain externally visible, because the symbols
from the 'test' executable would be used as input (ld -R).
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils