I hope this covers all the cases -- should we handle SHN_XINDEX here as well?
Also, do you want me to introduce a getLocalSymVA(InputSection, OutputSection, Sym) helper?
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Looks like getRelocationSymbol needs to be fixed first. It doesn't
handle SHN_XINDEX it it doesn't need to be templated over reloc type
since it never looks at the addend.
I will give it a quick try.
ELF/Writer.cpp | ||
---|---|---|
739 ↗ | (On Diff #35153) | This is the case where you have to handle Sym->st_shndx being SHN_XINDEX. |
Comment Actions
Trying to wrap this up.
- Handle SHN_XINDEX,
- git-clang-format'ed
- Split code in getLocalSymVA() (I plan to use in other places as well).
Comment Actions
LGTM with the test trimmed.
test/elf2/relocation-local.s | ||
---|---|---|
8 ↗ | (On Diff #35279) | This is not being used in this test, is it? |