Trim unused params from aout adjust_sizes_and_vmas
authorAlan Modra <amodra@gmail.com>
Tue, 1 Dec 2015 03:26:09 +0000 (13:56 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 1 Dec 2015 03:30:33 +0000 (14:00 +1030)
* aoutx.h (adjust_sizes_and_vmas): Remove unused text_size and
text_end parameters.  Update callers.
* aout-tic30.c: Update adjust_sizes_and_vmas callers.
* hp300hpux.c: Likewise.
* i386lynx.c: Likewise.
* libaout.h: Likewise.
* netbsd.h: Likewise.
* pdp11.c: Likewise.
* riscix.c: Likewise.

bfd/ChangeLog
bfd/aout-tic30.c
bfd/aoutx.h
bfd/hp300hpux.c
bfd/i386lynx.c
bfd/libaout.h
bfd/netbsd.h
bfd/pdp11.c
bfd/riscix.c

index 0fbdd64d6d2fb2559ed068036bc0b7730c9ce286..ca4f130a00b6f113098ea8a922eccc12e06fcc1f 100644 (file)
@@ -1,3 +1,15 @@
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+       * aoutx.h (adjust_sizes_and_vmas): Remove unused text_size and
+       text_end parameters.  Update callers.
+       * aout-tic30.c: Update adjust_sizes_and_vmas callers.
+       * hp300hpux.c: Likewise.
+       * i386lynx.c: Likewise.
+       * libaout.h: Likewise.
+       * netbsd.h: Likewise.
+       * pdp11.c: Likewise.
+       * riscix.c: Likewise.
+
 2015-12-01  Alan Modra  <amodra@gmail.com>
 
        * aout-adobe.c: Invoke aout N_* macros with pointer to
index 6852c85556a4a070fed0b772a25a8d9ecdc9e031..6ada4c1354c1bebd6b75a372cef17342ce33dbf3 100644 (file)
@@ -636,11 +636,8 @@ tic30_aout_write_object_contents (bfd *abfd)
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
   {
-    bfd_size_type text_size;   /* Dummy vars.  */
-    file_ptr text_end;
-
     if (adata (abfd).magic == undecided_magic)
-      NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
+      NAME (aout, adjust_sizes_and_vmas) (abfd);
 
     execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;
     execp->a_entry = bfd_get_start_address (abfd);
index cca386af7879044aee5723b7429af0af23bd7f93..51956d901e6cee81f7c5c7320996fb6e2d006981 100644 (file)
@@ -1111,9 +1111,7 @@ adjust_n_magic (bfd *abfd, struct internal_exec *execp)
 }
 
 bfd_boolean
-NAME (aout, adjust_sizes_and_vmas) (bfd *abfd,
-                                   bfd_size_type *text_size,
-                                   file_ptr *text_end ATTRIBUTE_UNUSED)
+NAME (aout, adjust_sizes_and_vmas) (bfd *abfd)
 {
   struct internal_exec *execp = exec_hdr (abfd);
 
@@ -1127,7 +1125,6 @@ NAME (aout, adjust_sizes_and_vmas) (bfd *abfd,
     align_power (obj_textsec (abfd)->size,
                 obj_textsec (abfd)->alignment_power);
 
-  *text_size = obj_textsec (abfd)->size;
   /* Rule (heuristic) for when to pad to a new page.  Note that there
      are (at least) two ways demand-paged (ZMAGIC) files have been
      handled.  Most Berkeley-based systems start the text segment at
@@ -1250,12 +1247,9 @@ NAME (aout, set_section_contents) (bfd *abfd,
                                   file_ptr offset,
                                   bfd_size_type count)
 {
-  file_ptr text_end;
-  bfd_size_type text_size;
-
   if (! abfd->output_has_begun)
     {
-      if (! NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end))
+      if (! NAME (aout, adjust_sizes_and_vmas) (abfd))
        return FALSE;
     }
 
@@ -5329,8 +5323,6 @@ NAME (aout, final_link) (bfd *abfd,
   bfd_size_type max_contents_size;
   bfd_size_type max_relocs_size;
   bfd_size_type max_sym_count;
-  bfd_size_type text_size;
-  file_ptr text_end;
   struct bfd_link_order *p;
   asection *o;
   bfd_boolean have_link_order_relocs;
@@ -5427,7 +5419,7 @@ NAME (aout, final_link) (bfd *abfd,
   /* Adjust the section sizes and vmas according to the magic number.
      This sets a_text, a_data and a_bss in the exec_hdr and sets the
      filepos for each section.  */
-  if (! NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end))
+  if (! NAME (aout, adjust_sizes_and_vmas) (abfd))
     goto error_return;
 
   /* The relocation and symbol file positions differ among a.out
index 564cdc2807308196e83686a4d40e32ffc19dc3b9..281b50fb1fbe1e1de6e3e697bfd19c6480873738 100644 (file)
@@ -280,15 +280,13 @@ MY (write_object_contents) (bfd * abfd)
 {
   struct external_exec exec_bytes;
   struct internal_exec *execp = exec_hdr (abfd);
-  bfd_size_type text_size;     /* dummy vars */
-  file_ptr text_end;
 
   memset (&exec_bytes, 0, sizeof (exec_bytes));
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
   if (adata (abfd).magic == undecided_magic)
-    NAME (aout,adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
+    NAME (aout,adjust_sizes_and_vmas) (abfd);
   execp->a_syms = 0;
 
   execp->a_entry = bfd_get_start_address (abfd);
index 91cac43c2c7604a0ae61f38eab0a2e3175ada4ae..2c8b3b4e0619c87e6e29bc5acbec543c09f1f529 100644 (file)
 #ifndef WRITE_HEADERS
 #define WRITE_HEADERS(abfd, execp)                                           \
       {                                                                              \
-       bfd_size_type text_size; /* dummy vars */                             \
-       file_ptr text_end;                                                    \
        if (adata(abfd).magic == undecided_magic)                             \
-         NAME(aout,adjust_sizes_and_vmas) (abfd, &text_size, &text_end);     \
+         NAME(aout,adjust_sizes_and_vmas) (abfd);                            \
                                                                              \
        execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;        \
        execp->a_entry = bfd_get_start_address (abfd);                        \
index 9f32cc8d092de7563b63e99a6d7593a17ea62083..5c76f3a3099e561c44dd8b647bb209ae812255aa 100644 (file)
@@ -564,7 +564,7 @@ extern int NAME (aout, sizeof_headers)
   (bfd *, struct bfd_link_info *);
 
 extern bfd_boolean NAME (aout, adjust_sizes_and_vmas)
-  (bfd *, bfd_size_type *, file_ptr *);
+  (bfd *);
 
 extern void NAME (aout, swap_exec_header_in)
   (bfd *, struct external_exec *, struct internal_exec *);
@@ -624,11 +624,8 @@ extern bfd_boolean NAME (aout, bfd_free_cached_info)
 #ifndef WRITE_HEADERS
 #define WRITE_HEADERS(abfd, execp)                                           \
       {                                                                              \
-       bfd_size_type text_size; /* Dummy vars.  */                           \
-       file_ptr text_end;                                                    \
-                                                                                     \
        if (adata(abfd).magic == undecided_magic)                             \
-         NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end); \
+         NAME (aout, adjust_sizes_and_vmas) (abfd);                          \
                                                                              \
        execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;        \
        execp->a_entry = bfd_get_start_address (abfd);                        \
index abd5fe7ba55947d105b46229f5b56ae588cabd23..a696b9821d6b3e16ca823370164ef9fd6a2d1db4 100644 (file)
@@ -84,12 +84,7 @@ MY (write_object_contents) (bfd *abfd)
      will normally have been done by set_section_contents, but only if
      there actually are some section contents.  */
   if (! abfd->output_has_begun)
-    {
-      bfd_size_type text_size;
-      file_ptr text_end;
-
-      NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end);
-    }
+    NAME (aout, adjust_sizes_and_vmas) (abfd);
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
index f6a7c3830e5edd32b1d670a0da7feddac2df1936..e3317bc6dcc99b2cfb05ad91e9b57f76b4de10a7 100644 (file)
@@ -292,11 +292,9 @@ static int
 pdp11_aout_write_headers (bfd *abfd, struct internal_exec *execp)
 {
   struct external_exec exec_bytes;
-  bfd_size_type text_size;
-  file_ptr text_end;
 
   if (adata(abfd).magic == undecided_magic)
-    NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
+    NAME (aout, adjust_sizes_and_vmas) (abfd);
 
   execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;
   execp->a_entry = bfd_get_start_address (abfd);
@@ -359,12 +357,7 @@ MY(write_object_contents) (bfd *abfd)
      will normally have been done by set_section_contents, but only if
      there actually are some section contents.  */
   if (! abfd->output_has_begun)
-    {
-      bfd_size_type text_size;
-      file_ptr text_end;
-
-      NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
-    }
+    NAME (aout, adjust_sizes_and_vmas) (abfd);
 
   obj_reloc_entry_size (abfd) = RELOC_SIZE;
 
@@ -1015,9 +1008,7 @@ adjust_n_magic (bfd *abfd, struct internal_exec *execp)
 }
 
 bfd_boolean
-NAME (aout, adjust_sizes_and_vmas) (bfd *abfd,
-                                   bfd_size_type *text_size,
-                                   file_ptr * text_end ATTRIBUTE_UNUSED)
+NAME (aout, adjust_sizes_and_vmas) (bfd *abfd)
 {
   struct internal_exec *execp = exec_hdr (abfd);
 
@@ -1031,7 +1022,6 @@ NAME (aout, adjust_sizes_and_vmas) (bfd *abfd,
     align_power(obj_textsec(abfd)->size,
                obj_textsec(abfd)->alignment_power);
 
-  *text_size = obj_textsec (abfd)->size;
   /* Rule (heuristic) for when to pad to a new page.  Note that there
      are (at least) two ways demand-paged (ZMAGIC) files have been
      handled.  Most Berkeley-based systems start the text segment at
@@ -1142,12 +1132,9 @@ NAME (aout, set_section_contents) (bfd *abfd,
                                   file_ptr offset,
                                   bfd_size_type count)
 {
-  file_ptr text_end;
-  bfd_size_type text_size;
-
   if (! abfd->output_has_begun)
     {
-      if (! NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end))
+      if (! NAME (aout, adjust_sizes_and_vmas) (abfd))
        return FALSE;
     }
 
@@ -3676,8 +3663,6 @@ NAME (aout, final_link) (bfd *abfd,
   bfd_size_type max_contents_size;
   bfd_size_type max_relocs_size;
   bfd_size_type max_sym_count;
-  bfd_size_type text_size;
-  file_ptr text_end;
   struct bfd_link_order *p;
   asection *o;
   bfd_boolean have_link_order_relocs;
@@ -3773,7 +3758,7 @@ NAME (aout, final_link) (bfd *abfd,
   /* Adjust the section sizes and vmas according to the magic number.
      This sets a_text, a_data and a_bss in the exec_hdr and sets the
      filepos for each section.  */
-  if (! NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end))
+  if (! NAME (aout, adjust_sizes_and_vmas) (abfd))
     goto error_return;
 
   /* The relocation and symbol file positions differ among a.out
index a1f6401426d3b588748e6b9cfed9a842aa6ac34d..fb780e2e7614d0ff8497bde56f05091707de34f3 100644 (file)
 
 #define WRITE_HEADERS(abfd, execp)                                         \
   {                                                                        \
-    bfd_size_type text_size; /* Dummy vars.  */                                    \
-    file_ptr text_end;                                                     \
-                                                                           \
     if (adata (abfd).magic == undecided_magic)                             \
-      NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end);   \
+      NAME (aout, adjust_sizes_and_vmas) (abfd);                           \
                                                                            \
     execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;         \
     execp->a_entry = bfd_get_start_address (abfd);                         \
This page took 0.03437 seconds and 4 git commands to generate.