aboutsummaryrefslogtreecommitdiff
path: root/gas
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 /gas
parent3ea17611f9c0a265d51cbdd4d0989b12c11aaad4 (diff)
downloadfsf-binutils-gdb-45dfa85a1ee44000d43abb7945a4aa7631707563.zip
fsf-binutils-gdb-45dfa85a1ee44000d43abb7945a4aa7631707563.tar.gz
fsf-binutils-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 'gas')
-rw-r--r--gas/ChangeLog18
-rw-r--r--gas/config/obj-aout.c8
-rw-r--r--gas/config/obj-coff-seh.h4
-rw-r--r--gas/config/tc-hppa.c4
-rw-r--r--gas/config/tc-hppa.h9
-rw-r--r--gas/config/tc-ia64.c6
-rw-r--r--gas/config/tc-m32r.c6
-rw-r--r--gas/config/tc-microblaze.c6
-rw-r--r--gas/config/tc-mips.c6
-rw-r--r--gas/config/tc-score.c8
-rw-r--r--gas/config/tc-score7.c10
-rw-r--r--gas/config/tc-tic6x.c6
-rw-r--r--gas/ecoff.c8
-rw-r--r--gas/symbols.c4
14 files changed, 61 insertions, 42 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d33b434..b199a17 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,21 @@
+2012-05-05 Alan Modra <amodra@gmail.com>
+
+ * ecoff.c: 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.
+ * symbols.c: Likewise.
+ * config/obj-aout.c: Likewise.
+ * config/obj-coff-seh.h: Likewise.
+ * config/tc-hppa.c: Likewise.
+ * config/tc-hppa.h: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-m32r.c: Likewise.
+ * config/tc-microblaze.c: Likewise.
+ * config/tc-mips.c: Likewise.
+ * config/tc-score.c: Likewise.
+ * config/tc-score7.c: Likewise.
+ * config/tc-tic6x.c: Likewise.
+
2012-05-04 H.J. Lu <hongjiu.lu@intel.com>
* configure.tgt: Support x86_64-*-linux-gnux32.
diff --git a/gas/config/obj-aout.c b/gas/config/obj-aout.c
index 32c68aa..ce72135 100644
--- a/gas/config/obj-aout.c
+++ b/gas/config/obj-aout.c
@@ -1,6 +1,6 @@
/* a.out object file format
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010
+ 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2012
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -42,7 +42,7 @@ obj_aout_frob_symbol (symbolS *sym, int *punt ATTRIBUTE_UNUSED)
if (! (type & ~ (N_TYPE | N_EXT)))
{
if (type == (N_UNDF | N_EXT)
- && sec == &bfd_abs_section)
+ && sec == bfd_abs_section_ptr)
{
sec = bfd_und_section_ptr;
S_SET_SEGMENT (sym, sec);
@@ -54,8 +54,8 @@ obj_aout_frob_symbol (symbolS *sym, int *punt ATTRIBUTE_UNUSED)
&& (type & N_TYPE) != N_SETD
&& (type & N_TYPE) != N_SETB
&& type != N_WARNING
- && (sec == &bfd_abs_section
- || sec == &bfd_und_section))
+ && (sec == bfd_abs_section_ptr
+ || sec == bfd_und_section_ptr))
return;
if (flags & BSF_EXPORT)
type |= N_EXT;
diff --git a/gas/config/obj-coff-seh.h b/gas/config/obj-coff-seh.h
index 22267be..71c803f 100644
--- a/gas/config/obj-coff-seh.h
+++ b/gas/config/obj-coff-seh.h
@@ -1,5 +1,5 @@
/* seh pdata/xdata coff object file format
- Copyright 2009
+ Copyright 2009, 2010, 2012
Free Software Foundation, Inc.
This file is part of GAS.
@@ -150,7 +150,7 @@ static void obj_coff_seh_proc (int);
static void obj_coff_seh_handler (int);
static void obj_coff_seh_handlerdata (int);
-#define UNDSEC (asection *) &bfd_und_section
+#define UNDSEC bfd_und_section_ptr
/* Check if x64 UNW_... macros are already defined. */
#ifndef PEX64_FLAG_NHANDLER
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index e688f71..b36fc2c 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -1,6 +1,6 @@
/* tc-hppa.c -- Assemble for the PA
Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -2207,7 +2207,7 @@ pa_parse_number (char **s, int is_float)
register, so... */
have_prefix = TRUE;
}
- else if (S_GET_SEGMENT (sym) == &bfd_abs_section)
+ else if (S_GET_SEGMENT (sym) == bfd_abs_section_ptr)
num = S_GET_VALUE (sym);
else if (!strict)
{
diff --git a/gas/config/tc-hppa.h b/gas/config/tc-hppa.h
index cd8c205..78d9edf 100644
--- a/gas/config/tc-hppa.h
+++ b/gas/config/tc-hppa.h
@@ -1,6 +1,7 @@
/* tc-hppa.h -- Header file for the PA
Copyright 1989, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -137,8 +138,8 @@ int hppa_fix_adjustable (struct fix *);
*not* end up in the symbol table. Likewise for absolute symbols
with local scope. */
#define tc_frob_symbol(sym,punt) \
- if ((S_GET_SEGMENT (sym) == &bfd_und_section && ! symbol_used_p (sym)) \
- || (S_GET_SEGMENT (sym) == &bfd_abs_section \
+ if ((S_GET_SEGMENT (sym) == bfd_und_section_ptr && ! symbol_used_p (sym)) \
+ || (S_GET_SEGMENT (sym) == bfd_abs_section_ptr \
&& ! S_IS_EXTERNAL (sym))) \
punt = 1
@@ -178,7 +179,7 @@ int hppa_fix_adjustable (struct fix *);
#define tc_frob_symbol(sym,punt) \
{ \
- if ((S_GET_SEGMENT (sym) == &bfd_und_section \
+ if ((S_GET_SEGMENT (sym) == bfd_und_section_ptr \
&& ! symbol_used_p (sym) \
&& ELF_ST_VISIBILITY (S_GET_OTHER (sym)) == STV_DEFAULT) \
|| strcmp (S_GET_NAME (sym), "$global$") == 0 \
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index cd3a1db..0366ac4 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -1,6 +1,6 @@
/* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2011 Free Software Foundation, Inc.
+ 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GAS, the GNU Assembler.
@@ -7785,9 +7785,9 @@ ia64_frob_label (struct symbol *sym)
int
ia64_frob_symbol (struct symbol *sym)
{
- if ((S_GET_SEGMENT (sym) == &bfd_und_section && ! symbol_used_p (sym) &&
+ if ((S_GET_SEGMENT (sym) == bfd_und_section_ptr && ! symbol_used_p (sym) &&
ELF_ST_VISIBILITY (S_GET_OTHER (sym)) == STV_DEFAULT)
- || (S_GET_SEGMENT (sym) == &bfd_abs_section
+ || (S_GET_SEGMENT (sym) == bfd_abs_section_ptr
&& ! S_IS_EXTERNAL (sym)))
return 1;
return 0;
diff --git a/gas/config/tc-m32r.c b/gas/config/tc-m32r.c
index 426502f..c8a6584 100644
--- a/gas/config/tc-m32r.c
+++ b/gas/config/tc-m32r.c
@@ -1,6 +1,6 @@
/* tc-m32r.c -- Assembler for the Renesas M32R.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2009 Free Software Foundation, Inc.
+ 2006, 2007, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -723,12 +723,12 @@ md_begin (void)
/* We must construct a fake section similar to bfd_com_section
but with the name .scommon. */
- scom_section = bfd_com_section;
+ scom_section = *bfd_com_section_ptr;
scom_section.name = ".scommon";
scom_section.output_section = & scom_section;
scom_section.symbol = & scom_symbol;
scom_section.symbol_ptr_ptr = & scom_section.symbol;
- scom_symbol = * bfd_com_section.symbol;
+ scom_symbol = * bfd_com_section_ptr->symbol;
scom_symbol.name = ".scommon";
scom_symbol.section = & scom_section;
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index 7c6357e..440c88b 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -1,6 +1,6 @@
/* tc-microblaze.c -- Assemble code for Xilinx MicroBlaze
- Copyright 2009, 2010 Free Software Foundation.
+ Copyright 2009, 2010, 2012 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -2101,7 +2101,7 @@ md_estimate_size_before_relax (fragS * fragP,
else if (streq (fragP->fr_opcode, str_microblaze_ro_anchor))
{
/* It is accessed using the small data read only anchor. */
- if ((S_GET_SEGMENT (fragP->fr_symbol) == &bfd_com_section)
+ if ((S_GET_SEGMENT (fragP->fr_symbol) == bfd_com_section_ptr)
|| (S_GET_SEGMENT (fragP->fr_symbol) == sdata2_segment)
|| (S_GET_SEGMENT (fragP->fr_symbol) == sbss2_segment)
|| (! S_IS_DEFINED (fragP->fr_symbol)))
@@ -2125,7 +2125,7 @@ md_estimate_size_before_relax (fragS * fragP,
}
else if (streq (fragP->fr_opcode, str_microblaze_rw_anchor))
{
- if ((S_GET_SEGMENT (fragP->fr_symbol) == &bfd_com_section)
+ if ((S_GET_SEGMENT (fragP->fr_symbol) == bfd_com_section_ptr)
|| (S_GET_SEGMENT (fragP->fr_symbol) == sdata_segment)
|| (S_GET_SEGMENT (fragP->fr_symbol) == sbss_segment)
|| (!S_IS_DEFINED (fragP->fr_symbol)))
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 449d8c3..d6b8ecb 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -1,6 +1,6 @@
/* tc-mips.c -- assemble code for a MIPS chip.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by the OSF and Ralph Campbell.
Written by Keith Knowles and Ralph Campbell, working independently.
@@ -17009,8 +17009,8 @@ pic_need_relax (symbolS *sym, asection *segtype)
symsec = S_GET_SEGMENT (sym);
/* This must duplicate the test in adjust_reloc_syms. */
- return (symsec != &bfd_und_section
- && symsec != &bfd_abs_section
+ return (!bfd_is_und_section (symsec)
+ && !bfd_is_abs_section (symsec)
&& !bfd_is_com_section (symsec)
&& !s_is_linkonce (sym, segtype)
#ifdef OBJ_ELF
diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c
index 3d62002..822b9cf 100644
--- a/gas/config/tc-score.c
+++ b/gas/config/tc-score.c
@@ -1,5 +1,5 @@
/* tc-score.c -- Assembler for Score
- Copyright 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright 2006, 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
Contributed by:
Brain.lin (brain.lin@sunplusct.com)
Mei Ligang (ligang@sunnorth.com.cn)
@@ -5316,9 +5316,9 @@ s3_pic_need_relax (symbolS *sym, asection *segtype)
}
/* This must duplicate the test in adjust_reloc_syms. */
- return (symsec != &bfd_und_section
- && symsec != &bfd_abs_section
- && ! bfd_is_com_section (symsec)
+ return (!bfd_is_und_section (symsec)
+ && !bfd_is_abs_section (symsec)
+ && !bfd_is_com_section (symsec)
&& !linkonce
#ifdef OBJ_ELF
/* A global or weak symbol is treated as external. */
diff --git a/gas/config/tc-score7.c b/gas/config/tc-score7.c
index c4ae5dd..520bd07 100644
--- a/gas/config/tc-score7.c
+++ b/gas/config/tc-score7.c
@@ -1,5 +1,5 @@
/* tc-score7.c -- Assembler for Score7
- Copyright 2009, 2011 Free Software Foundation, Inc.
+ Copyright 2009, 2011, 2012 Free Software Foundation, Inc.
Contributed by:
Brain.lin (brain.lin@sunplusct.com)
Mei Ligang (ligang@sunnorth.com.cn)
@@ -5200,10 +5200,10 @@ s7_pic_need_relax (symbolS *sym, asection *segtype)
}
/* This must duplicate the test in adjust_reloc_syms. */
- return (symsec != &bfd_und_section
- && symsec != &bfd_abs_section
- && ! bfd_is_com_section (symsec)
- && !linkonce
+ return (!bfd_is_und_section (symsec)
+ && !bfd_is_abs_section (symsec)
+ && !bfd_is_com_section (symsec)
+ && !linkonce
#ifdef OBJ_ELF
/* A global or weak symbol is treated as external. */
&& (OUTPUT_FLAVOR != bfd_target_elf_flavour
diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c
index 017254a..ddbfb50 100644
--- a/gas/config/tc-tic6x.c
+++ b/gas/config/tc-tic6x.c
@@ -1,5 +1,5 @@
/* TI C6X assembler.
- Copyright 2010, 2011
+ Copyright 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by Joseph Myers <joseph@codesourcery.com>
Bernd Schmidt <bernds@codesourcery.com>
@@ -790,12 +790,12 @@ md_begin (void)
/* We must construct a fake section similar to bfd_com_section
but with the name .scommon. */
- scom_section = bfd_com_section;
+ scom_section = *bfd_com_section_ptr;
scom_section.name = ".scommon";
scom_section.output_section = & scom_section;
scom_section.symbol = & scom_symbol;
scom_section.symbol_ptr_ptr = & scom_section.symbol;
- scom_symbol = * bfd_com_section.symbol;
+ scom_symbol = * bfd_com_section_ptr->symbol;
scom_symbol.name = ".scommon";
scom_symbol.section = & scom_section;
}
diff --git a/gas/ecoff.c b/gas/ecoff.c
index 102ce9e..348f98e 100644
--- a/gas/ecoff.c
+++ b/gas/ecoff.c
@@ -1,6 +1,6 @@
/* ECOFF debugging support.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
@@ -3589,12 +3589,12 @@ ecoff_frob_symbol (symbolS *sym)
but with the name .scommon. */
if (scom_section.name == NULL)
{
- scom_section = bfd_com_section;
+ scom_section = *bfd_com_section_ptr;
scom_section.name = ".scommon";
scom_section.output_section = &scom_section;
scom_section.symbol = &scom_symbol;
scom_section.symbol_ptr_ptr = &scom_section.symbol;
- scom_symbol = *bfd_com_section.symbol;
+ scom_symbol = *bfd_com_section_ptr->symbol;
scom_symbol.name = ".scommon";
scom_symbol.section = &scom_section;
}
@@ -4076,7 +4076,7 @@ ecoff_build_symbols (const struct ecoff_debug_swap *backend,
sc = sc_Bss;
else if (strcmp (segname, ".sbss") == 0)
sc = sc_SBss;
- else if (seg == &bfd_abs_section)
+ else if (seg == bfd_abs_section_ptr)
sc = sc_Abs;
else
{
diff --git a/gas/symbols.c b/gas/symbols.c
index 679534d..1f325c4 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -1,7 +1,7 @@
/* symbols.c -symbol table-
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011 Free Software Foundation, Inc.
+ 2011, 2012 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -2778,7 +2778,7 @@ symbol_begin (void)
memset ((char *) (&abs_symbol), '\0', sizeof (abs_symbol));
#if defined (EMIT_SECTION_SYMBOLS) || !defined (RELOC_REQUIRES_SYMBOL)
- abs_symbol.bsym = bfd_abs_section.symbol;
+ abs_symbol.bsym = bfd_abs_section_ptr->symbol;
#endif
abs_symbol.sy_value.X_op = O_constant;
abs_symbol.sy_frag = &zero_address_frag;