OSDN Git Service

* ldlang.c (lang_reset_memory_regions): Rename from
authorhp <hp>
Tue, 5 Feb 2002 06:52:15 +0000 (06:52 +0000)
committerhp <hp>
Tue, 5 Feb 2002 06:52:15 +0000 (06:52 +0000)
reset_memory_regions.  Change all callers.  Make public.
* ldlang.h (lang_reset_memory_regions): Prototype.
* emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
lang_reset_memory_regions before lang_size_sections.

ld/ChangeLog
ld/emultempl/elf32.em
ld/ldlang.c
ld/ldlang.h

index baee989..ea076bc 100644 (file)
@@ -1,3 +1,11 @@
+2002-02-05  Hans-Peter Nilsson  <hp@axis.com>
+
+       * ldlang.c (lang_reset_memory_regions): Rename from
+       reset_memory_regions.  Change all callers.  Make public.
+       * ldlang.h (lang_reset_memory_regions): Prototype.
+       * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
+       lang_reset_memory_regions before lang_size_sections.
+
 2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
 
        * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
index b2fd969..c62727d 100644 (file)
@@ -12,8 +12,8 @@ cat >e${EMULATION_NAME}.c <<EOF
 /* This file is is generated by a shell script.  DO NOT EDIT! */
 
 /* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME}
-   Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-   Free Software Foundation, Inc.
+   Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+   2002 Free Software Foundation, Inc.
    Written by Steve Chamberlain <sac@cygnus.com>
    ELF support by Ian Lance Taylor <ian@cygnus.com>
 
@@ -1330,6 +1330,8 @@ gld${EMULATION_NAME}_finish ()
 {
   if (bfd_elf${ELFSIZE}_discard_info (output_bfd, &link_info))
     {
+      lang_reset_memory_regions ();
+
       /* Resize the sections.  */
       lang_size_sections (stat_ptr->head, abs_output_section,
                          &stat_ptr->head, 0, (bfd_vma) 0, NULL);
index a7b53dd..456bc7f 100644 (file)
@@ -132,7 +132,6 @@ static boolean lang_one_common PARAMS ((struct bfd_link_hash_entry *, PTR));
 static void lang_place_orphans PARAMS ((void));
 static int topower PARAMS ((int));
 static void lang_set_startof PARAMS ((void));
-static void reset_memory_regions PARAMS ((void));
 static void gc_section_callback
   PARAMS ((lang_wild_statement_type *, struct wildcard_list *, asection *,
           lang_input_statement_type *, PTR));
@@ -3972,8 +3971,8 @@ lang_final ()
 
 /* Reset the current counters in the regions.  */
 
-static void
-reset_memory_regions ()
+void
+lang_reset_memory_regions ()
 {
   lang_memory_region_type *p = lang_memory_region_list;
   asection *o;
@@ -4160,7 +4159,7 @@ lang_process ()
 
       do
        {
-         reset_memory_regions ();
+         lang_reset_memory_regions ();
 
          relax_again = false;
 
index 983d34c..7641992 100644 (file)
@@ -1,13 +1,13 @@
 /* ldlang.h - linker command language support
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001
+   2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GLD, the Gnu Linker.
 
    GLD is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 1, or (at your option)
+   the Free Software Foundation; either version 2, or (at your option)
    any later version.
 
    GLD is distributed in the hope that it will be useful,
@@ -402,6 +402,7 @@ extern void lang_for_each_input_file
   PARAMS ((void (*dothis) (lang_input_statement_type *)));
 extern void lang_for_each_file
   PARAMS ((void (*dothis) (lang_input_statement_type *)));
+extern void lang_reset_memory_regions PARAMS ((void));
 extern bfd_vma lang_do_assignments
   PARAMS ((lang_statement_union_type * s,
           lang_output_section_statement_type *output_section_statement,