aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2003-10-18 15:49:10 +0000
committerHans-Peter Nilsson <hp@axis.com>2003-10-18 15:49:10 +0000
commit06335781f67d53f9512551e31195e40d0b584f8f (patch)
tree1a24bac5a8701ebd27fa8dbaa941b186a7d70296 /ld
parentf4b9d8efb98b8d65beae3cec24d881927d1a94f0 (diff)
downloadgdb-06335781f67d53f9512551e31195e40d0b584f8f.zip
gdb-06335781f67d53f9512551e31195e40d0b584f8f.tar.gz
gdb-06335781f67d53f9512551e31195e40d0b584f8f.tar.bz2
* emultempl/mmix-elfnmmo.em (mmix_before_allocation): Force linker
relaxation always; don't exclude relocatable linking. Adjust for _bfd_mmix_prepare_linker_allocated_gregs renamed to _bfd_mmix_before_linker_allocation. (mmix_after_allocation): Adjust for _bfd_mmix_finalize_linker_allocated_gregs renamed to _bfd_mmix_after_linker_allocation. * scripttempl/mmo.sc: Use ADDR (.text), not . - SIZEOF (.text).
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog9
-rw-r--r--ld/emultempl/mmix-elfnmmo.em10
-rw-r--r--ld/scripttempl/mmo.sc2
3 files changed, 15 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index be94011..187ae59 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,14 @@
2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
+ * emultempl/mmix-elfnmmo.em (mmix_before_allocation): Force linker
+ relaxation always; don't exclude relocatable linking. Adjust for
+ _bfd_mmix_prepare_linker_allocated_gregs renamed to
+ _bfd_mmix_before_linker_allocation.
+ (mmix_after_allocation): Adjust for
+ _bfd_mmix_finalize_linker_allocated_gregs renamed to
+ _bfd_mmix_after_linker_allocation.
+ * scripttempl/mmo.sc: Use ADDR (.text), not . - SIZEOF (.text).
+
* ldlang.c (lang_size_sections): Last, set _cooked_size for output
sections.
diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em
index 3668e51..9777fa3 100644
--- a/ld/emultempl/mmix-elfnmmo.em
+++ b/ld/emultempl/mmix-elfnmmo.em
@@ -38,11 +38,11 @@ mmix_before_allocation (void)
maintenance burden to keep them in sync. (Of course we lose the
maintenance burden of checking that it still does what we need.) */
- /* Force -relax on if not doing a relocatable link. */
- if (! link_info.relocatable)
- command_line.relax = TRUE;
+ /* Force -relax on (regardless of whether we're doing a relocatable
+ link). */
+ command_line.relax = TRUE;
- if (!_bfd_mmix_prepare_linker_allocated_gregs (output_bfd, &link_info))
+ if (!_bfd_mmix_before_linker_allocation (output_bfd, &link_info))
einfo ("%X%P: Internal problems setting up section %s",
MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME);
}
@@ -109,7 +109,7 @@ mmix_after_allocation (void)
if (sec != NULL)
bfd_set_section_vma (abfd, sec, 0);
- if (!_bfd_mmix_finalize_linker_allocated_gregs (output_bfd, &link_info))
+ if (!_bfd_mmix_after_linker_allocation (output_bfd, &link_info))
{
/* This is a fatal error; make einfo call not return. */
einfo ("%F%P: Can't finalize linker-allocated global registers\n");
diff --git a/ld/scripttempl/mmo.sc b/ld/scripttempl/mmo.sc
index b93953d..643b349 100644
--- a/ld/scripttempl/mmo.sc
+++ b/ld/scripttempl/mmo.sc
@@ -55,7 +55,7 @@ SECTIONS
${RELOCATING+ PROVIDE(_etext = .);}
${RELOCATING+ PROVIDE(__etext = .);}
}
- ${RELOCATING+Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : . - SIZEOF (.text));}
+ ${RELOCATING+Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : ADDR (.text));}
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }