ld/
authorNathan Sidwell <nathan@codesourcery.com>
Tue, 29 Aug 2006 10:57:16 +0000 (10:57 +0000)
committerNathan Sidwell <nathan@codesourcery.com>
Tue, 29 Aug 2006 10:57:16 +0000 (10:57 +0000)
* ldexp.c (fold_name): Loadaddrs of sections with an lma_region
are absolute.

ld/testsuite/
* ld-elf/loadaddr3.t: New.
* ld-elf/loadaddr3a.d: New.
* ld-elf/loadaddr3b.d: New.

ChangeLog.csl
ld/ldexp.c
ld/testsuite/ld-elf/loadaddr3a.d
ld/testsuite/ld-elf/loadaddr3b.d

index a351202..f469507 100644 (file)
@@ -1,3 +1,14 @@
+2006-08-29  Nathan Sidwell  <nathan@codesourcery.com>
+
+       ld/
+       * ldexp.c (fold_name): Loadaddrs of sections with an lma_region
+       are absolute.
+
+       ld/testsuite/
+       * ld-elf/loadaddr3.t: New.
+       * ld-elf/loadaddr3a.d: New.
+       * ld-elf/loadaddr3b.d: New.
+
 2006-08-24  Mark Shinwell  <shinwell@codesourcery.com>
 
        bfd/
index c9d707e..2a8366c 100644 (file)
@@ -578,7 +578,14 @@ fold_name (etree_type *tree)
              if (os->load_base == NULL)
                new_rel (0, NULL, os->bfd_section);
              else
-               exp_fold_tree_1 (os->load_base);
+               {
+                 exp_fold_tree_1 (os->load_base);
+                 /* If this section has a load region, the expression
+                    will be absolute.  */
+                 if (os->lma_region && expld.result.valid_p)
+                   expld.result.section = bfd_abs_section_ptr;
+               }
+             
            }
        }
       break;
index 36e0420..07685c9 100644 (file)
@@ -1,7 +1,7 @@
 #source: loadaddr.s
-#ld: -T loadaddr3.t -z max-page-size=0x200000
+#ld: -T loadaddr3.t
 #readelf: -l --wide
-#target: *-*-linux*
+#target: *-*-elf*
 
 #...
   LOAD +0x000000 0x0*00000000 0x0*00000000 0x0*0101 0x0*0101 R E 0x.*
index af7eb87..bb9f7be 100644 (file)
@@ -1,7 +1,7 @@
 #source: loadaddr.s
-#ld: -T loadaddr3.t -z max-page-size=0x200000
+#ld: -T loadaddr3.t
 #objdump: -t
-#target: *-*-linux*
+#target: *-*-elf*
 
 #...
 0+0000100 l    d  .text        0+0000000 .text