summaryrefslogtreecommitdiffstats
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-05-05 03:05:32 +0000
committerAlan Modra <amodra@gmail.com>2012-05-05 03:05:32 +0000
commit45dfa85a1ee44000d43abb7945a4aa7631707563 (patch)
tree4fbcbb79f675fb33e849112175102446d2fc8e64 /ld
parent3ea17611f9c0a265d51cbdd4d0989b12c11aaad4 (diff)
downloadppe42-binutils-45dfa85a1ee44000d43abb7945a4aa7631707563.tar.gz
ppe42-binutils-45dfa85a1ee44000d43abb7945a4aa7631707563.zip
Replace all uses of bfd_abs_section, bfd_com_section, bfd_und_section
and bfd_ind_section with their _ptr variants, or use corresponding bfd_is_* macros.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/pe-dll.c13
2 files changed, 12 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c80b07f416..90fe1f600f 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-05 Alan Modra <amodra@gmail.com>
+
+ * pe-dll.c (process_def_file_and_drectve): Use bfd_und_section_ptr.
+ (generate_reloc): Use bfd_abs_section_ptr.
+
2012-05-04 H.J. Lu <hongjiu.lu@intel.com>
* configure.tgt: Support x86_64-*-linux-gnux32.
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 85bf2a7b35..b50a1097c9 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -720,9 +720,10 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
/* We should export symbols which are either global or not
anything at all. (.bss data is the latter)
We should not export undefined symbols. */
- bfd_boolean would_export = symbols[j]->section != &bfd_und_section
- && ((symbols[j]->flags & BSF_GLOBAL)
- || (symbols[j]->flags == 0));
+ bfd_boolean would_export
+ = (symbols[j]->section != bfd_und_section_ptr
+ && ((symbols[j]->flags & BSF_GLOBAL)
+ || (symbols[j]->flags == 0)));
if (link_info.version_info && would_export)
would_export
= !bfd_hide_sym_by_version (link_info.version_info,
@@ -1351,7 +1352,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
/* I don't know why there would be a reloc for these, but I've
seen it happen - DJ */
- if (s->output_section == &bfd_abs_section)
+ if (s->output_section == bfd_abs_section_ptr)
continue;
if (s->output_section->vma == 0)
@@ -1408,7 +1409,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
no reason we'd want a reference to any absolute
address to get relocated during rebasing). */
if (!h2 || h2->root.type == bfd_link_hash_undefined
- || h2->root.u.def.section == &bfd_abs_section)
+ || h2->root.u.def.section == bfd_abs_section_ptr)
continue;
}
else if (!blhe || blhe->type != bfd_link_hash_defined)
@@ -1767,7 +1768,7 @@ static int tmp_seq2;
static const char *dll_filename;
static char *dll_symname;
-#define UNDSEC (asection *) &bfd_und_section
+#define UNDSEC bfd_und_section_ptr
static asection *
quick_section (bfd *abfd, const char *name, int flags, int align)
OpenPOWER on IntegriCloud