CTSRD-CHERI / lld

http://llvm.org/git/lld with added CHERI support
http://www.chericpu.com
Other
0 stars 3 forks source link

LLD produces incorrectly alligned file offsets (Regression) (linker script issue?) #16

Open LawrenceEsswood opened 7 years ago

LawrenceEsswood commented 7 years ago

LLD is producing ELF sections whose files offsets are not correctly aligned. Example elfdump:

[Nr] Name              Type            Addr             Off    Size   ES Flg Lk Inf Al

[13] .bss              NOBITS          00000000000062e0 0062c8 0013e8 00  WA  0   0 32

[14] .data             PROGBITS        00000000000076e0 0076e0 0000f0 00  WA  0   0 32

This ELF was produced with a linker script that has the following directives:

.text ALIGN(CAP_ALIGN): { *(.text) }
.bss  ALIGN(CAP_ALIGN): { *(.bss) }
.data ALIGN(CAP_ALIGN): { *(.data) }

Where CAP_ALIGN is appropriate . Sadly cannot find the exact commit where this started.

arichardson commented 6 years ago

Is this still broken?