This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
<>It seems able to distinguish them. Is e_machine the field that holds EM_V800 or EM_V850 or EM_<machine> in general?
<> I'm only asking because the machine type seems to be encoded somewhere else as well: I hex-edit my GCC-compiled object file (carefully avoiding generating relocs; just symbols) to change the EM_V850 to EM_V800 at file offset 0x12, which makes the Green Hills linker happy enough to link the file in, but their "gdump" utility still says e_machine = <<< unknown V800 machine type (0x24) >>> but their own object files have exactly the same 0x24!
No that is about it.(See elf_object_p() in bfd/elfcode.h). Also note that for a lot of targets with related variants (eg ARM, MIPS etc) a supplementary mechanism is used to distinguish between variants. This can be flags in the e_flags of the header or a special section in the object file containing information about how the file was compiled.
Thanks; I'll check that out if/when I fold my hackery back into the v850
bits. In the v850 case, the use is to subtly influence the set of valid
instructions, no? Or is there much beyond that?
Yes - but the *meaning* of a reloc is not encoded within the reloc structure stored in the object file. All the linker has to go on is a reloc number. (Plus the knowledge of the target architecture of the object file). If the linker encounters a reloc number that it has not been programmed to handle (for a given architecture) then all it can do it complain. It has no way to derive the semantics of the reloc.
Yes, I understood that - that's why the reloc interpretation should be
delegated the the backend *for that input file*, no?
You later mention
the possibility of only the output bfd knowing whether to copy relocs or
not; that may throw a spanner in my works.
And now the only "not SUPPORTED" relocs are the v800 ones for which IIn theory, only the assumption that input_architecture == output_architecture.
haven't yet added support. What did I break?
In "theory"? Do you think that assumption is manifested anywhere?
Cheers Nick
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |