[LLVMdev] Request for help: why does the program link correctly?

Soumitra Chatterjee soumitra at hp.com
Thu Jul 2 23:32:24 PDT 2015


Someone in my team pointed to an open bug about this in gcc:
	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35514

Would this be applicable to Clang as well?

Thanks,
Soumitra

On 03-Jul-2015 10:53 AM, Tim Northover wrote:
> On 2 July 2015 at 21:51, Nema, Ashutosh <Ashutosh.Nema at amd.com> wrote:
>> Jim, I didn’t understood why foo is not marked with type 'FUNC'.
>
> Just convention, as far as I can tell (certainly GNU as does the same
> thing for undefined symbols).
>
> The ARM ELF ABI says that either STT_NOTYPE or STT_FUNC would be
> acceptable on that platform, the x86_64 ABI seems to be silent on the
> issue.
>
>> At least as per elf standard symbol foo should be marked as 'FUNC'
>> STT_FUNC:    The symbol is associated with a function or other executable code.
>
> For whatever reason, that's only taken to be necessary for defined
> symbols in reality (you could argue that wording only says "STT_FUNC
> => function symbol", not "function symbol => STT_FUNC").
>
> Cheers.
>
> Tim.
>




More information about the llvm-dev mailing list