CTSRD-CHERI / lld

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

.text start address different from bfd #3

Open arichardson opened 7 years ago

arichardson commented 7 years ago

bfd:

/sources/ctsrd/testproj/dynamic/helloworld.nodebug:     file format elf64-tradbigmips
/sources/ctsrd/testproj/dynamic/helloworld.nodebug
architecture: mips:8000, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x0000000120000ae0

lld:

/sources/ctsrd/testproj/dynamic-with-lld/helloworld.nodebug:     file format elf64-tradbigmips
/sources/ctsrd/testproj/dynamic-with-lld/helloworld.nodebug
architecture: mips:8000, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x0000000000020000
arichardson commented 7 years ago

After the latest patch lld now uses 120010000.

I think the bfd linker script is wrong as we probably want the text statement to be superpage aligned and not merged with the read-only data sections.

lld aligns to 64KB which seems to be a valid MIPS page size (what are we using in CheriBSD?)