This is the mail archive of the binutils@sourceware.org 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]

Re: How to use bits_per_byte (~OCTETS_PER_BYTE) of bfd_arch_info_type in binutils port?


Hi Alan,

>> but 'bfd_get16(location)' seems
>> to be interpreting the location value as a byte index:
>
> Well why not?  After all, "location" just points into the section
> contents, an array of bytes.
Anyway, shouldn't location point to the right instruction? After all,
location := contents + address in _bfd_final_link_relocate and is not
easy manipulatable externally, since address is sanity checked at the
beginning of _bfd_final_link_relocate.

> There are at least two other binutils ports that work with
> OCTETS_PER_BYTE greater than one, tic4x and tic54x.  You should look
> at them if you have not done so already.  Unfortunately, they are both
> COFF.  The generic ELF code is missing some conversions between octets
> and bytes (one such is on calls to bfd_set_section_contents in
> elflink.c).  You get to fix it.  :-)
I know about these architectures, but mine uses ELF so I did not dig
too much into them. I am not that much into the binutils and it does
not seem like this can be fixed easily. Have you got some more details
on where these missing conversions could reside?

Cheers,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]