This is an archive of the discontinued LLVM Phabricator instance.

Allow the gas-style nonstandard SHT_GROUP section.
ClosedPublic

Authored by ruiu on Jun 9 2017, 1:06 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu created this revision.Jun 9 2017, 1:06 PM
This revision was automatically updated to reflect the committed changes.