As of r238073[1] Clang will combine string tables:
Produce a single string table in a ELF .o
Normally an ELF .o has two string tables, one for symbols, one for section
names.With the scheme of naming sections like ".text.foo" where foo is a symbol,
there is a big potential saving in using a single one.
elfcopy/strip fails when stripping such an object with:
strip: 692 gelf_getshdr() failed: Invalid argument
[1] http://llvm.org/viewvc/llvm-project?view=revision&revision=238073
Attaching empty.o, a Clang 3.7-built object from an empty .c file.
Quick fix [r3225] made elfcopy/strip able to work on these objects:
.shstrtab section is created when input object does not have it.
We will support the same optimization as Clang 3.7.0 later.
Related
Commit: [r3225]
The [r3225] fix is now in FreeBSD here: https://svnweb.freebsd.org/base?view=revision&revision=284339
It solves the failure with clang 3.7.0-compiled objects. Should we close this and create a new ticket for introducing the optimization?
Related
Commit: [r3225]
Failure is fixed as indicated; see [#502] for enhancement to add the same optimization.
Related
Tickets: #502