[PATCH] ld.so: handle STT_COMMON symbols
Carmelo AMOROSO
carmelo.amoroso at st.com
Mon Oct 8 12:01:11 UTC 2007
Joakim Tjernlund wrote:
> On Mon, 2007-10-08 at 12:15 +0200, Carmelo AMOROSO wrote:
>
>> Joakim Tjernlund wrote:
>>
>>> On Mon, 2007-10-08 at 09:10 +0200, Carmelo AMOROSO wrote:
>>>
>>>
>>>> Hi Folks,
>>>> as reported into glibc bug #5104
>>>> (http://sourceware.org/bugzilla/show_bug.cgi?id=5104)
>>>>
>>>>
>>>>
>>> [snip]
>>>
>>> I am good with this change. One question though: I don't think the
>>> STT_SECTION and STT_FILE are present in a relocatable object. If this
>>> is true(needs to be checked), then the above if stmt can be changed to:
>>> #define STT_RELOC_MAX STT_TLS
>>> or
>>> #define STT_RELOC_MAX STT_COMMON
>>> if (ELF_ST_TYPE(sym->st_info) > STT_RELOC_MAX)
>>>
>>> or if the above assumption is true only for STT_FILE
>>> if (ELF_ST_TYPE(sym->st_info) > STT_RELOC_MAX || ELF_ST_TYPE(sym->st_info) == STT_SECTION)
>>>
>>>
>> This is the case, STT_SECTION symbol are present into symbol table of
>> the libuClibc.so.0 for sure.
>> Actually, I did not find any STT_FILE symbols...
>>
>
> Right, but they are STB_LOCAL I think. If so they are skipped anyway.
>
Yes, they are STB_LOCAL, but we should skip them earlier to avoid
calling a pointless strcmp... right?
Carmelo
More information about the uClibc
mailing list