H.J. Lu wrote:
On Thu, May 08, 2008 at 01:57:26PM +0100, Nathan Sidwell wrote:
Hi,
I have a bug report about i86-ld allowing you to create big endian
i86 modules with:
ld -EB ....
The linker produces no errors, but the resultant file is marked with
unknown architecture, and is pretty useless :) Is there a rationale
for not issuing an error at link time? I notice elf32-i386.c lacks a
You may want to take a look at closest_target_match in ldlang.c.
It matches -EB any with big endian ELF target like elf64-big
or elf32-big. I think closest_target_match is too simple for ELF
target. We should at least check one or more of arch,
elf_machine_code, elf_size_info.
How about having closest_target_match ignore elf{32,64}-{big,little} ?
Those vectors are only added so you can do _something_ with the wrong
endianness (as bfd/config.bfd tells us):
# If we support any ELF target, then automatically add support for the
# generic ELF targets. This permits an objdump with some ELF support
# to be used on an arbitrary ELF file for anything other than
# relocation information.
but without relocation processing, there's not much linking you can do.
ok?
nathan