[PATCH] PR ld/16467: Check incompatible existing default symbol definition
H.J. Lu
hjl.tools@gmail.com
Tue Jan 21 13:49:00 GMT 2014
On Mon, Jan 20, 2014 at 8:40 PM, Alan Modra <amodra@gmail.com> wrote:
> On Mon, Jan 20, 2014 at 05:30:20AM -0800, H.J. Lu wrote:
>> if (pold_alignment == NULL
>> - && !info->shared
>> - && !info->export_dynamic
>> - && !h->ref_dynamic
>> && newdyn
>> && newdef
>> && !olddyn
>> - && (olddef || h->root.type == bfd_link_hash_common)
>> - && ELF_ST_TYPE (sym->st_info) != h->type
>> - && ELF_ST_TYPE (sym->st_info) != STT_NOTYPE
>> - && h->type != STT_NOTYPE
>> - && !(newfunc && oldfunc))
>> + && ((!info->shared
>> + && !info->export_dynamic
>> + && !h->ref_dynamic
>
> I'd like to understand why you kept the above three lines. I'm
> inclined to think they ought to disappear. If it is correct to omit
> the default symbol for an executable, why not a shared library, and
> why is it important to test ref_dynamic? Try linking your pr2404
> testcase as a pie.
>
Here is the updated patch with those 3 tests removed. OK
for trunk?
Thanks.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Check-incompatible-existing-default-symbol-definitio.patch
Type: text/x-patch
Size: 7036 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20140121/6c99b52d/attachment.bin>
More information about the Binutils
mailing list