[PATCH] PR ld/19636: [x86] Resolve undefweak and defined symbols in executable
Alan Modra
amodra@gmail.com
Wed Feb 24 01:39:00 GMT 2016
More information about the Binutils mailing list
Wed Feb 24 01:39:00 GMT 2016
- Previous message (by thread): [PATCH] PR ld/19636: [x86] Resolve undefweak and defined symbols in executable
- Next message (by thread): [PATCH] PR ld/19636: [x86] Resolve undefweak and defined symbols in executable
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Feb 23, 2016 at 09:58:14AM -0800, H.J. Lu wrote: > For i386 and x86-64, undefined weak and defined symbols are resolved > without dynamic relocation when creating executable. Undefined weak > symbols aren't needed in the dynamic symbol table in executable. One > exception is on i386, we need undefined weak symbols in the dynamic > symbol table in PIE if input relocatable files contain branchs without > PLT so that we can branch to 0 with dynamic relocation in text section. > > This makes behaviors of static excutable, dynamic excutable and position > independent executable consistent with references to undefined weak and > defined symbols, regardless if the relocatable input is compiled with > PIC or not. People know that PIC and non-PIC are different on x86 and many other architectures. For example, a quick google search turns up https://glandium.org/blog/?p=2764 "On Linux systems, this just works. Compile the program (you’ll need to build it with -fPIC, though)..." I've seen other references to this feature, which you will break with your patch. Quite frankly, if this is new to you, as you say in https://sourceware.org/ml/binutils/2016-02/msg00290.html then you should not be rushing so quickly into this change. -- Alan Modra Australia Development Lab, IBM
- Previous message (by thread): [PATCH] PR ld/19636: [x86] Resolve undefweak and defined symbols in executable
- Next message (by thread): [PATCH] PR ld/19636: [x86] Resolve undefweak and defined symbols in executable
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list