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]

PATCH: ld lma assignment test failure


On Tue, Aug 22, 2006 at 07:45:38PM -0700, H. J. Lu wrote:
> On Wed, Aug 23, 2006 at 11:25:24AM +0930, Alan Modra wrote:
> > On Tue, Aug 22, 2006 at 11:46:48AM -0700, H. J. Lu wrote:
> > > On Tue, Aug 22, 2006 at 05:03:44PM +0930, Alan Modra wrote:
> > > > Fixes doco for this change, and warns on backward movement of VMA
> > > > unless accompanied with an explicit LMA assignment.  I guess I should
> > > > have added the news item when I committed the first patch to raise
> > > > awareness of the change in default lma.  Apologies for that, I wasn't
> > > > trying to slip a change in under the radar!  I still feel it's a good
> > > > change for 2.18, one that shouldn't affect too many scripts, and those
> > > > that it does are easily fixed.
> > > 
> > > I tried AT (.). It seems to generate different outputs comparing with
> > > the old linker.
> > 
> > AT(ADDR(section_name)) is probably better.  AT(.) ignores section
> > alignment requirements.
> 
> It seems to work for the testcase. I think we should document it in
> case that people want the old behavior.
> 
> 

Here is the patch for the 2 failed testcases.


H.J.
---
2006-08-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3052
	* ld-elf/loadaddr1.t: Add "AT (ADDR(.data))".
	* ld-elf/loadaddr2.t: Likewise.

--- ld/testsuite/ld-elf/loadaddr1.t.load	2006-08-18 07:38:00.000000000 -0700
+++ ld/testsuite/ld-elf/loadaddr1.t	2006-08-22 20:30:14.000000000 -0700
@@ -8,6 +8,6 @@ SECTIONS
     { *(.bar) }
   . = LOADADDR(.bar) + 4096;
   . = ALIGN(8192);
-  .data : { *(.data) }
+  .data : AT (ADDR(.data)) { *(.data) }
   /DISCARD/ : { *(.*) }
 }
--- ld/testsuite/ld-elf/loadaddr2.t.load	2006-08-18 07:38:00.000000000 -0700
+++ ld/testsuite/ld-elf/loadaddr2.t	2006-08-22 20:30:04.000000000 -0700
@@ -8,6 +8,6 @@ SECTIONS
     { *(.bar) }
   . = LOADADDR(.bar) + 0x200000;
   . = ALIGN(8192);
-  .data : { *(.data) }
+  .data : AT (ADDR(.data)) { *(.data) }
   /DISCARD/ : { *(.*) }
 }


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