[PATCH] D34064: Allow the gas-style nonstandard SHT_GROUP section.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 18:34:34 PDT 2017


Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:

> ruiu created this revision.
> Herald added a subscriber: emaste.
>
> The ELF standard defines that the SHT_GROUP section as follows:
>
> - its sh_link has the symbol index, and
> - the symbol name is used to uniquify section groups.
>
> Some object files created by the GNU assembler don't seem to conform
> to the standard. It looks like they have this additional rule:
>
> - if the symbol has no name and a STT_SECTION symbol, a section name is used instead of a symbol name.
>
> If we don't do anything for this, the linker fails with a mysterious
> error message if input files are generated by gas. It is unfortunate
> but I think we need to support it.

Do you have a description on how to create these files with gas? I have
seems something like it when doing a freebsd build, but it looks like
gas has been fixed a long time ago.

It looks like gold is still broken:

https://sourceware.org/bugzilla/show_bug.cgi?id=21493

Is it possible the file you found wast created by gold -r?

Cheers,
Rafael


More information about the llvm-commits mailing list