[PATCH] D93783: [ELFObjectWriter] emit STT_SECTION symbols for sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 23 15:26:28 PST 2020


MaskRay added a comment.

I understand that it is a pain for Linux kernel's objtool but r239045 ("Omit unused section symbols from the symbol table.") is a really/really desired enhancement and size optimization.
GNU as's behavior is inferior here. For a -ffunction-sections or -fdata-sections build, there can be many sections. Wasting sizeof(Elf64_Shdr)=64 bytes (STT_SECTION not used by a relocation, which is very common) on each section is really not acceptable.
objtool should take pain and fix whatever issues due to this. I'll happy to defend MC's behavior for any such instance in Linux kernel's mailing lists.

I thought I filed a GNU as feature request but it seems that I haven't (perhaps I just mentioned this on a binutils at sourceware.org thread but did not actually file a feature request). I'll file a feature request.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93783/new/

https://reviews.llvm.org/D93783



More information about the llvm-commits mailing list