aboutsummaryrefslogtreecommitdiff
path: root/gas/subsegs.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-05-11 15:53:47 +0000
committerNick Clifton <nickc@redhat.com>2004-05-11 15:53:47 +0000
commit22fe14ad41ac9f7b8fd61bc25e08e51094dcb116 (patch)
tree30b9b33fb64957ef4f0ebbf61820a56e1a86a8ca /gas/subsegs.c
parentd0b57c3ab13c612490eedcf66de5e3826d0fc16c (diff)
downloadgdb-22fe14ad41ac9f7b8fd61bc25e08e51094dcb116.zip
gdb-22fe14ad41ac9f7b8fd61bc25e08e51094dcb116.tar.gz
gdb-22fe14ad41ac9f7b8fd61bc25e08e51094dcb116.tar.bz2
Apply H.J.'s patch to fix label arithmetic when multiple same-name sections are involved
Diffstat (limited to 'gas/subsegs.c')
-rw-r--r--gas/subsegs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gas/subsegs.c b/gas/subsegs.c
index b2432e9..9e46cfe 100644
--- a/gas/subsegs.c
+++ b/gas/subsegs.c
@@ -1,6 +1,6 @@
/* subsegs.c - subsegments -
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2002
+ 1999, 2000, 2002, 2004
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -524,7 +524,9 @@ section_symbol (segT sec)
else
{
s = symbol_find_base (sec->symbol->name, 0);
- if (s == NULL)
+ /* We have to make sure it is the right symbol when we
+ have multiple sections with the same section name. */
+ if (s == NULL || S_GET_SEGMENT (s) != sec)
s = symbol_new (sec->symbol->name, sec, 0, &zero_address_frag);
else
{