bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE


From: amodra at gmail dot com
Subject: [Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE
Date: Mon, 09 Oct 2017 05:54:11 +0000

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

--- Comment #4 from Alan Modra <amodra at gmail dot com> ---
I agree that undefined weak symbols probably ought to resolve to 0 in a static
PIE.  To do that on ppc it would be reasonable to add the following to elf32.em
after_parse

  if (link_info.dynamic_undefined_weak == -1
      && link_info.nointerp)
    link_info.dynamic_undefined_weak = FALSE;

or perhaps something a little more specific to static PIE..

However, that results in
FAIL: ld-i386/pr19636-1d
FAIL: ld-i386/pr19636-1e
FAIL: ld-i386/pr19636-1f
FAIL: ld-x86-64/pr19636-2d
FAIL: ld-x86-64/pr19636-2e
FAIL: ld-x86-64/pr19636-2f

So, why does x86 make undefined weak symbols dynamic in the -d tests (which are
-pie --no-dynamic-linker)?

-- 
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]