[PATCH] D100490: [ELF] Check the Elf_Rel addends for dynamic relocations
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 23 03:38:08 PDT 2021
peter.smith added a comment.
I've had a quick read through and I like where this is going. There's a lot to check through and I've run out of time today. I've left a couple of small suggestions. Will need to come back and look in more detail, probably next week to see if I've got anything else to add.
================
Comment at: lld/ELF/SyntheticSections.h:456
+ kind(kind), expr(expr), addend(addend) {}
DynamicReloc(RelType type, const InputSectionBase *inputSec,
+ uint64_t offsetInSec, int64_t addend = 0)
----------------
Could we add a similar comment to the MIPS multi-GOT implementation?
// This constructor records a relative relocation with no symbol
================
Comment at: lld/ELF/SyntheticSections.h:525
+ /// Add a dynamic relocation against \p sym with an optional addend.
+ void addReloc(RelType dynType, InputSectionBase *isec, uint64_t offsetInSec,
+ Symbol &sym, int64_t addend = 0,
----------------
Is there scope to rename this so that it is easier to see at the call site? Like addRelativeReloc(). For example addSymbolReloc() or addAgainstSymbolReloc();
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100490/new/
https://reviews.llvm.org/D100490
More information about the llvm-commits
mailing list