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: Symbol values in memory word units


Alan Modra <amodra@bigpond.net.au> writes:

> On Mon, Dec 01, 2008 at 05:18:32PM -0800, Oleg Volf wrote:
>> linker expects section's vma and lma in byte units
>
> See bfd_arch_mach_octets_per_byte and OCTETS_PER_BYTE.

But in practice these are poorly defined and it is really hard to use
these successfully.  What I've done in the past is keep symbol values
and relocation addresses in bytes, and adjust in the relocation
routines.  This means that nm, objdump, readelf print the wrong
values, but it's not a difficult mental adjustment.

Ian


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