summaryrefslogtreecommitdiff
path: root/bfd/xcofflink.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-03-18 12:46:27 +0000
committerNick Clifton <nickc@redhat.com>2002-03-18 12:46:27 +0000
commitd3d0d6b7f062fbfe66c573c1f487664978af78ca (patch)
treec5c9559e8ee671a10564f63395458ef9b3de15cc /bfd/xcofflink.c
parentd9628192123bcbea77c6e753034cff7c177d2be6 (diff)
downloadbinutils-redhat-d3d0d6b7f062fbfe66c573c1f487664978af78ca.tar.gz
Add AIX 64 shared library support and emulation layer for binutils
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r--bfd/xcofflink.c79
1 files changed, 42 insertions, 37 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 5b1ddcca71..b817426ae6 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -3,21 +3,21 @@
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program 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 2 of the License, or
-(at your option) any later version.
+ This program 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 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -3141,37 +3141,42 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
csectpp = xcoff_data (sub)->csects;
- symesz = bfd_coff_symesz (sub);
- esym = (bfd_byte *) obj_coff_external_syms (sub);
- esymend = esym + symcount * symesz;
- while (esym < esymend)
+ /* Dynamic object do not have csectpp's. */
+ if (NULL != csectpp)
{
- struct internal_syment sym;
+ symesz = bfd_coff_symesz (sub);
+ esym = (bfd_byte *) obj_coff_external_syms (sub);
+ esymend = esym + symcount * symesz;
- bfd_coff_swap_sym_in (sub, (PTR) esym, (PTR) &sym);
+ while (esym < esymend)
+ {
+ struct internal_syment sym;
- *debug_index = (unsigned long) -1;
+ bfd_coff_swap_sym_in (sub, (PTR) esym, (PTR) &sym);
- if (sym._n._n_n._n_zeroes == 0
- && *csectpp != NULL
- && (! gc
- || ((*csectpp)->flags & SEC_MARK) != 0
- || *csectpp == bfd_abs_section_ptr)
- && bfd_coff_symname_in_debug (sub, &sym))
- {
- char *name;
- bfd_size_type indx;
+ *debug_index = (unsigned long) -1;
- name = (char *) debug_contents + sym._n._n_n._n_offset;
- indx = _bfd_stringtab_add (debug_strtab, name, true, true);
- if (indx == (bfd_size_type) -1)
- goto error_return;
- *debug_index = indx;
- }
+ if (sym._n._n_n._n_zeroes == 0
+ && *csectpp != NULL
+ && (! gc
+ || ((*csectpp)->flags & SEC_MARK) != 0
+ || *csectpp == bfd_abs_section_ptr)
+ && bfd_coff_symname_in_debug (sub, &sym))
+ {
+ char *name;
+ bfd_size_type indx;
- esym += (sym.n_numaux + 1) * symesz;
- csectpp += sym.n_numaux + 1;
- debug_index += sym.n_numaux + 1;
+ name = (char *) debug_contents + sym._n._n_n._n_offset;
+ indx = _bfd_stringtab_add (debug_strtab, name, true, true);
+ if (indx == (bfd_size_type) -1)
+ goto error_return;
+ *debug_index = indx;
+ }
+
+ esym += (sym.n_numaux + 1) * symesz;
+ csectpp += sym.n_numaux + 1;
+ debug_index += sym.n_numaux + 1;
+ }
}
free (debug_contents);