aboutsummaryrefslogtreecommitdiff
path: root/gdb
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 /gdb
parent3ea17611f9c0a265d51cbdd4d0989b12c11aaad4 (diff)
downloadgdb-45dfa85a1ee44000d43abb7945a4aa7631707563.zip
gdb-45dfa85a1ee44000d43abb7945a4aa7631707563.tar.gz
gdb-45dfa85a1ee44000d43abb7945a4aa7631707563.tar.bz2
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 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/elfread.c8
-rw-r--r--gdb/machoread.c6
3 files changed, 14 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6f1ef45..69270c7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2012-05-05 Alan Modra <amodra@gmail.com>
+
+ * elfread.c (elf_symtab_read): Use bfd_abs_section_ptr and
+ bfd_und_section_ptr.
+ * machoread.c (macho_symtab_add_minsym): Use bfd_abs_section_ptr
+ and bfd_com_section_ptr.
+
2012-05-04 Joel Brobecker <brobecker@adacore.com>
* MAINTAINERS (Past Maintainers): Add Chris Faylor.
diff --git a/gdb/elfread.c b/gdb/elfread.c
index d825d9a..d8dec38 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -272,7 +272,7 @@ elf_symtab_read (struct objfile *objfile, int type,
offset = ANOFFSET (objfile->section_offsets, sym->section->index);
if (type == ST_DYNAMIC
- && sym->section == &bfd_und_section
+ && sym->section == bfd_und_section_ptr
&& (sym->flags & BSF_FUNCTION))
{
struct minimal_symbol *msym;
@@ -367,7 +367,7 @@ elf_symtab_read (struct objfile *objfile, int type,
symaddr = sym->value + sym->section->vma;
/* Relocate all non-absolute and non-TLS symbols by the
section offset. */
- if (sym->section != &bfd_abs_section
+ if (sym->section != bfd_abs_section_ptr
&& !(sym->section->flags & SEC_THREAD_LOCAL))
{
symaddr += offset;
@@ -375,7 +375,7 @@ elf_symtab_read (struct objfile *objfile, int type,
/* For non-absolute symbols, use the type of the section
they are relative to, to intuit text/data. Bfd provides
no way of figuring this out for absolute symbols. */
- if (sym->section == &bfd_abs_section)
+ if (sym->section == bfd_abs_section_ptr)
{
/* This is a hack to get the minimal symbol type
right for Irix 5, which has absolute addresses
@@ -517,7 +517,7 @@ elf_symtab_read (struct objfile *objfile, int type,
symaddr = sym->value + sym->section->vma;
/* Relocate non-absolute symbols by the
section offset. */
- if (sym->section != &bfd_abs_section)
+ if (sym->section != bfd_abs_section_ptr)
symaddr += offset;
sectinfo->sections[special_local_sect] = symaddr;
/* The special local symbols don't go in the
diff --git a/gdb/machoread.c b/gdb/machoread.c
index 1986f54..22530ab 100644
--- a/gdb/machoread.c
+++ b/gdb/machoread.c
@@ -126,11 +126,11 @@ macho_symtab_add_minsym (struct objfile *objfile, const asymbol *sym)
interested in will have a section. */
/* Relocate all non-absolute and non-TLS symbols by the
section offset. */
- if (sym->section != &bfd_abs_section
+ if (sym->section != bfd_abs_section_ptr
&& !(sym->section->flags & SEC_THREAD_LOCAL))
symaddr += offset;
- if (sym->section == &bfd_abs_section)
+ if (sym->section == bfd_abs_section_ptr)
ms_type = mst_abs;
else if (sym->section->flags & SEC_CODE)
{
@@ -563,7 +563,7 @@ macho_add_oso_symfile (oso_el *oso, bfd *abfd,
res = macho_resolve_oso_sym_with_minsym (main_objfile, sym);
if (res != 0)
{
- sym->section = &bfd_com_section;
+ sym->section = bfd_com_section_ptr;
sym->value = res;
}
}