[PATCH] D111137: [ELF] Propagate phdrs to orphan section with a smaller rank
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 15 06:59:27 PDT 2021
peter.smith added a comment.
That is true, although it is the same result in ld.bfd (slightly different using AArch64 but comparable).
Elf file type is EXEC (Executable file)
Entry point 0x8000
There are 2 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x008000 0x0000000000008000 0x0000000000008000 0x000170 0x000170 RWE 0x10000
LOAD 0x008170 0x0000000000008170 0x0000000000008170 0x000000 0x000004 RW 0x10000
Section to Segment mapping:
Segment Sections...
00 .text .interp .dynsym .dynstr .hash .gnu.hash .dynamic .got .got.plt
01 .bss
None .symtab .strtab .shstrtab
I guess it comes down to how we interpret the PHDRS documentation https://sourceware.org/binutils/docs/ld/PHDRS.html do we assume that people using PHDRS are doing so for maximum control and it is up to the user to give enough direction in their linker script for LLD to do what they want. Or do we try and interpret the PHDRS and say you probably meant to do this. I think both are reasonable positions. I personally come down in favour of staying as close to ld.bfd as possible as that is where projects are migrated from, but happy to accept the alternative if MaskRay would prefer that direction.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111137/new/
https://reviews.llvm.org/D111137
More information about the llvm-commits
mailing list