arm-elf ld fails phdrs test
H . J . Lu
hjl@lucon.org
Sun Mar 12 12:26:00 GMT 2000
On Sun, Mar 12, 2000 at 01:46:55PM +0000, Philip Blundell wrote:
> The current version of ld configured for arm-elf is failing the
> ld-scripts/phdrs.exp test. The problem is that the last segment in the output
> file looks like this:
>
> LOAD off 0x00000098 vaddr 0x00080098 paddr 0x00080098 align 2**15
> filesz 0x00000004 memsz 0x00000004 flags rwx
>
> whereas it's not supposed to be executable.
>
> >From a quick poke around with the debugger it seems that the special .glue_7
> and .glue_7t sections are ending up in the .data segment, rather than in .text
> where they belong, and so the former segment is inheriting their executable
> flag.
>
> Does anybody have time to investigate this?
>
That is the bug in ld-scripts/phdrs.t:
---
PHDRS
{
header PT_PHDR PHDRS ;
text PT_LOAD FILEHDR PHDRS ;
data PT_LOAD ;
}
SECTIONS
{
. = 0x80000 + SIZEOF_HEADERS;
.text : { *(.text) } :text
.data : { *(.data) } :data
/DISCARD/ : { *(.reginfo) }
}
---
Some ELF emulations define OTHER_TEXT_SECTIONS. But they won't
show up in ld-scripts/phdrs.t. Maybe we should put all those
sections in ld-scripts/phdrs.t.
H.J.
More information about the Binutils
mailing list