[PATCH] D45788: Mitigate relocation overflow [part 1 of 2]
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 1 11:16:47 PDT 2018
grimar added inline comments.
================
Comment at: ELF/Writer.cpp:728
+ if (Sec->Type == SHT_DYNSYM || Sec->Type == SHT_STRTAB)
+ return Rank;
+
----------------
So, this places SHT_DYNSYM and SHT_SYMTAB sections first
in "a" sections group just because they do not get RF_NOT_TLS rank
(like other "a" sections) because of this early return, right?
Then it seems that behavior is based on an accident.
I would suggest adding new RF_* rank probably to make it explicit.
================
Comment at: test/ELF/dynsec-at-beginning.s:16
+.section foo, "aw"
+.byte 0
----------------
I am not sure having "aw" section is useful here.
I would instead expect to see `foo` as "a" section instead. To show
how non-synthetic SHF _ALLOC sections are placed with the new code.
Because currently, you show the layout of "a" synthetic sections
(.dynsym, .dynstr, .hash) only.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D45788
More information about the llvm-commits
mailing list