[PATCH] D52830: [ELF] - Set sh_info and sh_link for .rela.plt sections.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 4 10:48:11 PDT 2018
ruiu added inline comments.
================
Comment at: ELF/SyntheticSections.cpp:1496-1497
// dynamic symbol and we don't need a dynamic symbol table. If that
- // is the case, just use 0 as the link.
- getParent()->Link =
- In.DynSymTab ? In.DynSymTab->getParent()->SectionIndex : 0;
+ // is the case, just use the index of the regular symbol table section
+ // as the link to suppress the warnings reported by GNU tools like readelf.
+ getParent()->Link = In.DynSymTab ? In.DynSymTab->getParent()->SectionIndex
----------------
You do that not because GNU tools complain but because that's the right thing to do according to ELF spec, no?
https://reviews.llvm.org/D52830
More information about the llvm-commits
mailing list