[PATCH] D40652: [ELF] - Produce relocation section name consistent with output section name when --emit-reloc used with linker script.
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 30 14:58:18 PST 2017
Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:
> ruiu added inline comments.
>
>
> ================
> Comment at: ELF/Writer.cpp:91
> +StringRef elf::getOutputSectionName(InputSectionBase *S) {
> + StringRef Name = S->Name;
> +
> ----------------
> This saves only two characters. Just use S->Name instead of Name.
>
>
> ================
> Comment at: ELF/Writer.cpp:104-105
> + // technically required, but not doing it is odd). This code guarantees that.
> + if ((S->Type == SHT_REL || S->Type == SHT_RELA) &&
> + !isa<SyntheticSection>(S)) {
> + OutputSection *Out =
> ----------------
> Is it possible that a section is a synthetic section and has type of SHT_REL[A]?
The RelocationSection section is synthetic and has SHT_RELA type.
Cheers,
Rafael
More information about the llvm-commits
mailing list