This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR ld/19636: [x86] Resolve undefweak and defined symbols in executable


Hi HJ,

On 26/02/16 12:51, H.J. Lu wrote:
On Thu, Feb 25, 2016 at 10:59 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
Here is the updated patch I am testing.  The linker behavior is changed
in 2 cases when creating executable:

1. When there are mixed PIC and non-PIC references to undefined
weak symbols, undefined weak symbols are resolved to 0 at link-time.
2. If all references to undefined weak symbols are PIC, dynamic
relocations against undefined weak symbols will be generated unless
-z nodynamic-undefined-weak is passed to linker.

BTW,  We have to resolve R_X86_64_32/R_X86_64_PC32 relocations
against undefined weak symbols to zero.  Otherwise, we will get run-time
relocation overflow for dynamic R_X86_64_32/R_X86_64_PC32 relocations.

This is what I am checking in.



I'm seeing:

NA->FAIL: Mixing PIC and non-PIC
on aarch64-none-linux-gnu.

Thanks,
Kyrill


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]