From: Nathan Sidwell Date: Tue, 29 Aug 2006 10:57:16 +0000 (+0000) Subject: ld/ X-Git-Tag: binutils-csl-renesas-4_1-9~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3a2bdb87631e510db8137aaf35668ca2c55a88d6;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/ChangeLog.csl b/ChangeLog.csl index a3512025b8c..f469507cf66 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,14 @@ +2006-08-29 Nathan Sidwell + + 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 bfd/ diff --git a/ld/ldexp.c b/ld/ldexp.c index c9d707e793e..2a8366c6243 100644 --- a/ld/ldexp.c +++ b/ld/ldexp.c @@ -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; diff --git a/ld/testsuite/ld-elf/loadaddr3a.d b/ld/testsuite/ld-elf/loadaddr3a.d index 36e0420bc85..07685c913c6 100644 --- a/ld/testsuite/ld-elf/loadaddr3a.d +++ b/ld/testsuite/ld-elf/loadaddr3a.d @@ -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.* diff --git a/ld/testsuite/ld-elf/loadaddr3b.d b/ld/testsuite/ld-elf/loadaddr3b.d index af7eb87522a..bb9f7be466f 100644 --- a/ld/testsuite/ld-elf/loadaddr3b.d +++ b/ld/testsuite/ld-elf/loadaddr3b.d @@ -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