This is the mail archive of the 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: fix bug with loadaddr and load regions

Alan Modra wrote:
On Fri, Aug 25, 2006 at 11:52:18AM +0100, Nathan Sidwell wrote:
I fell over a problem with using a load region and loadaddr, to create a romable image. With
.data { data_load = LOADADDR(.data); ... } >ram AT>rom
I found that data_load's value became load address + execution address, because it was interpreted as a data-relative value. The same problem didn't manifest with
.data : AT(EXPR) { data_load = LOADADDR(.data); ...} >ram
but of course here I have to calculate EXPR myself.

I think this has been fixed by my 2006-08-23 fold_name change.

I'm not sure that it will have been. Your change altered the !os->load_base case, but with AT> we explicitly set os->load_base to an integer expression.

I committed your new testcases.

The "-z" options aren't elf-universal. Need to gate on > #target: *-*-linux*

Perhaps the -z option isn't needed on this testcase at all. Perhaps that would be a better change. (I'm not sure if I'd need to increase the memory region addresses in the linker script, to cover other targets though.)


Nathan Sidwell    ::   ::         CodeSourcery    ::

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