bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/19152] New: --gc-sections changes scope from global to local for


From: address@hidden
Subject: [Bug ld/19152] New: --gc-sections changes scope from global to local for --defysm or PROVIDE()
Date: Mon, 19 Oct 2015 09:20:13 +0000

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: address@hidden
  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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]