X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fliteral.c;h=7315f3eee035f64107f71c76b5225c0cc07d0035;hb=756d1d01889f120348ff040ef9599b595524d4b9;hp=ada59e73630cabc38e34cb99d6c815475d3a00f4;hpb=e98fe4f7b54cbdf29aef9287bbb1bea8801dd05a;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/literal.c b/gas/literal.c index ada59e7363..7315f3eee0 100644 --- a/gas/literal.c +++ b/gas/literal.c @@ -1,5 +1,5 @@ /* as.c - GAS literal pool management. - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright 1994, 2000 Free Software Foundation, Inc. Written by Ken Raeburn (raeburn@cygnus.com). This file is part of GAS, the GNU Assembler. @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This isn't quite a "constant" pool. Some of the values may get adjusted at run time, e.g., for symbolic relocations when shared @@ -60,13 +60,14 @@ add_to_literal_pool (sym, addend, sec, size) /* @@ This assumes all entries in a given section will be of the same size... Probably correct, but unwise to rely on. */ /* This must always be called with the same subsegment. */ - for (fixp = frchain_now->fix_root; - fixp != (fixS *) NULL; - fixp = fixp->fx_next, offset += size) - { - if (fixp->fx_addsy == sym && fixp->fx_offset == addend) - return offset; - } + if (seginfo->frchainP) + for (fixp = seginfo->frchainP->fix_root; + fixp != (fixS *) NULL; + fixp = fixp->fx_next, offset += size) + { + if (fixp->fx_addsy == sym && fixp->fx_offset == addend) + return offset; + } subseg_set (sec, 0); p = frag_more (size); @@ -87,10 +88,8 @@ add_to_literal_pool (sym, addend, sec, size) reloc_type); subseg_set (current_section, current_subsec); - offset = seginfo->literal_pool_size; seginfo->literal_pool_size += size; - return offset; } #endif /* BFD_ASSEMBLER */