diff options
author | Alan Modra <amodra@gmail.com> | 2004-06-15 01:16:35 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2004-06-15 01:16:35 +0000 |
commit | 587aac4eafdba408b9043477548474aa05c377cf (patch) | |
tree | 6796f8eb18628a913807f23f3b4fc07f680e72d4 /gas/config/obj-elf.c | |
parent | 52886d70655a6ad043b003fa1a949abfc70a8c7e (diff) | |
download | gdb-587aac4eafdba408b9043477548474aa05c377cf.zip gdb-587aac4eafdba408b9043477548474aa05c377cf.tar.gz gdb-587aac4eafdba408b9043477548474aa05c377cf.tar.bz2 |
* config/obj-coff.c (coff_adjust_section_syms): Use
bfd_get_section_size instead of bfd_get_section_size_before_reloc.
(coff_frob_section): Likewise.
* config/tc-mips.c (md_apply_fix3): Likewise.
* config/obj-elf.c (elf_frob_file): Use bfd_set_section_size.
(elf_frob_file_after_relocs): Likewise.
Diffstat (limited to 'gas/config/obj-elf.c')
-rw-r--r-- | gas/config/obj-elf.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index f970110..94f53b1 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -1,6 +1,6 @@ /* ELF object file format Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003 Free Software Foundation, Inc. + 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -1887,6 +1887,7 @@ elf_frob_file (void) flagword flags; struct symbol *sy; int has_sym; + bfd_size_type size; flags = SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_GROUP; for (s = list.head[i]; s != NULL; s = elf_next_in_group (s)) @@ -1927,8 +1928,9 @@ elf_frob_file (void) if (has_sym) elf_group_id (s) = sy->bsym; - s->_raw_size = 4 * (list.elt_count[i] + 1); - s->contents = frag_more (s->_raw_size); + size = 4 * (list.elt_count[i] + 1); + bfd_set_section_size (stdoutput, s, size); + s->contents = frag_more (size); frag_now->fr_fix = frag_now_fix_octets (); } @@ -2037,7 +2039,8 @@ elf_frob_file_after_relocs (void) to force the ELF backend to allocate a file position, and then write out the data. FIXME: Is this really the best way to do this? */ - sec->_raw_size = bfd_ecoff_debug_size (stdoutput, &debug, debug_swap); + bfd_set_section_size + (stdoutput, sec, bfd_ecoff_debug_size (stdoutput, &debug, debug_swap)); /* Pass BUF to bfd_set_section_contents because this will eventually become a call to fwrite, and ISO C prohibits |