https://sourceware.org/bugzilla/show_bug.cgi?id=22319

            Bug ID: 22319
           Summary: ld -u not working in new versions of binutils
           Product: binutils
           Version: 2.29
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: xavier.orogay at arm dot com
  Target Milestone: ---

Hello,
we found a bug in 2.27 and 2.29.

>From 'man ld'
-u symbol
Force symbol to be entered in the output file as an undefined symbol

However, this flag stopped working on 2.27 onwards.

Reproducer:
With a "hello world" program

$ gcc -c hello.c -o hello.o
$ ld -lc -u undefined_symbol -o hello.exe hello.o

$ nm hello.exe

'nm hello.exe' should contain "U undefined_symbol" line

WE found this issue on CentOS Linux release 7.4.1708 (AltArch), that uses
binutils 2.27-9. Then I tested binutils 2.29 on Ubuntu 16.04 (x86_64) with the
same result.


Best regards,
Xavier

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to