[committed, PATCH] Always create dynsym section with dynamic sections

H.J. Lu hjl.tools@gmail.com
Sun Apr 24 01:43:00 GMT 2016


On Sat, Apr 23, 2016 at 12:25 PM, Faraz Shahbazker
<faraz.shahbazker@imgtec.com> wrote:
>>>> You said dynsym should be treated treated the same for static and
>>>> dynamic executables.   dynsymcount is number of dynsym + 1 in
>>>> dynamic executable.  Why isn't it true for static executable?
>>>
>>> It is, or at least used to be, before this patch. It still is for both,
>>> before renumbering. But now the +1 only happens for dynamic executables
>>> when renumbering.
>>
>> Then what is wrong to always +1 for both dynamic and static
>> executables?
>
> Aah, now I see! Ever since the table was created, the count was at least 1.
> You are saying it should always remain at least 1 no matter what. Had a quick
> look through other uses of the field and it looks safe enough to me.
>

Here is a patch.  Does it work for you?

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Always-count-the-NULL-entry-in-dynamic-symbol-table.patch
Type: text/x-patch
Size: 1870 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20160424/b6794203/attachment.bin>


More information about the Binutils mailing list