summaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2006-01-09 17:14:40 +0000
committerH.J. Lu <hjl@lucon.org>2006-01-09 17:14:40 +0000
commitff7be2326ad2188d97dc522371b37cdd1833bd30 (patch)
treecb99a7bad95ebc51fdaece5bed184ca7f0f26eb2 /gas
parent94a0aa33f85eab18289297ae2b4c4a1da6584dcf (diff)
downloadbinutils-redhat-ff7be2326ad2188d97dc522371b37cdd1833bd30.tar.gz
gas/
2006-01-09 H.J. Lu <hongjiu.lu@intel.com> PR gas/2117 * symbols.c (snapshot_symbol): Don't change a defined symbol. gas/testsuite/ 2006-01-09 H.J. Lu <hongjiu.lu@intel.com> PR gas/2117 * gas/ia64/ia64.exp: Add ltoff22x-2, ltoff22x-3, ltoff22x-4 and ltoff22x-5. * gas/ia64/ltoff22x-2.d: New file. * gas/ia64/ltoff22x-2.s: Likewise. * gas/ia64/ltoff22x-3.d: Likewise. * gas/ia64/ltoff22x-3.s: Likewise. * gas/ia64/ltoff22x-4.d: Likewise. * gas/ia64/ltoff22x-4.s: Likewise. * gas/ia64/ltoff22x-5.d: Likewise. * gas/ia64/ltoff22x-5.s: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/symbols.c5
-rw-r--r--gas/testsuite/ChangeLog15
-rw-r--r--gas/testsuite/gas/ia64/ia64.exp7
-rw-r--r--gas/testsuite/gas/ia64/ltoff22x-2.d11
-rw-r--r--gas/testsuite/gas/ia64/ltoff22x-2.s13
-rw-r--r--gas/testsuite/gas/ia64/ltoff22x-3.d11
-rw-r--r--gas/testsuite/gas/ia64/ltoff22x-3.s13
-rw-r--r--gas/testsuite/gas/ia64/ltoff22x-4.d11
-rw-r--r--gas/testsuite/gas/ia64/ltoff22x-4.s13
-rw-r--r--gas/testsuite/gas/ia64/ltoff22x-5.d11
-rw-r--r--gas/testsuite/gas/ia64/ltoff22x-5.s13
12 files changed, 127 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1fd2f9ea6d..f7c8d3fb40 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/2117
+ * symbols.c (snapshot_symbol): Don't change a defined symbol.
+
2006-01-03 Hans-Peter Nilsson <hp@bitrange.com>
PR gas/2101
diff --git a/gas/symbols.c b/gas/symbols.c
index c9298e044c..ca2d41ea9c 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -1399,7 +1399,10 @@ snapshot_symbol (symbolS **symbolPP, valueT *valueP, segT *segP, fragS **fragPP)
}
}
- *symbolPP = symbolP;
+ /* Never change a defined symbol. */
+ if (symbolP->bsym->section == undefined_section
+ || symbolP->bsym->section == expr_section)
+ *symbolPP = symbolP;
*valueP = expr.X_add_number;
*segP = symbolP->bsym->section;
*fragPP = symbolP->sy_frag;
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 05b6967d03..7fe9e787ab 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,18 @@
+2006-01-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/2117
+ * gas/ia64/ia64.exp: Add ltoff22x-2, ltoff22x-3, ltoff22x-4 and
+ ltoff22x-5.
+
+ * gas/ia64/ltoff22x-2.d: New file.
+ * gas/ia64/ltoff22x-2.s: Likewise.
+ * gas/ia64/ltoff22x-3.d: Likewise.
+ * gas/ia64/ltoff22x-3.s: Likewise.
+ * gas/ia64/ltoff22x-4.d: Likewise.
+ * gas/ia64/ltoff22x-4.s: Likewise.
+ * gas/ia64/ltoff22x-5.d: Likewise.
+ * gas/ia64/ltoff22x-5.s: Likewise.
+
2006-01-03 Hans-Peter Nilsson <hp@bitrange.com>
PR gas/2101
diff --git a/gas/testsuite/gas/ia64/ia64.exp b/gas/testsuite/gas/ia64/ia64.exp
index 0c75519551..f68c107f52 100644
--- a/gas/testsuite/gas/ia64/ia64.exp
+++ b/gas/testsuite/gas/ia64/ia64.exp
@@ -46,6 +46,13 @@ if [istarget "ia64-*"] then {
run_dump_test "ldxmov-1"
run_list_test "ldxmov-2" ""
run_dump_test "ltoff22x-1"
+ run_dump_test "ltoff22x-2"
+ run_dump_test "ltoff22x-3"
+ run_dump_test "ltoff22x-4"
+ run_dump_test "ltoff22x-5"
+
+ run_dump_test "nostkreg"
+ run_list_test "invalid-ar" ""
run_dump_test "nostkreg"
run_list_test "invalid-ar" ""
diff --git a/gas/testsuite/gas/ia64/ltoff22x-2.d b/gas/testsuite/gas/ia64/ltoff22x-2.d
new file mode 100644
index 0000000000..8a2dbda120
--- /dev/null
+++ b/gas/testsuite/gas/ia64/ltoff22x-2.d
@@ -0,0 +1,11 @@
+# objdump: -r
+# name: ia64 ltoff22x-2
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[\.text\]:
+OFFSET[ ]+TYPE[ ]+VALUE
+0+000 LTOFF22X foo
+0+010 LDXMOV foo
+
+
diff --git a/gas/testsuite/gas/ia64/ltoff22x-2.s b/gas/testsuite/gas/ia64/ltoff22x-2.s
new file mode 100644
index 0000000000..cbd27f2819
--- /dev/null
+++ b/gas/testsuite/gas/ia64/ltoff22x-2.s
@@ -0,0 +1,13 @@
+ .global foo#
+ foo# = bar#
+ .global bar#
+ .data
+bar:
+ data4 0
+ .text
+ addl r3 = @ltoffx(foo#), gp
+ nop.i 0
+ nop.i 0
+ ld8.mov r3 = [r3], foo#
+ nop.i 0
+ nop.i 0
diff --git a/gas/testsuite/gas/ia64/ltoff22x-3.d b/gas/testsuite/gas/ia64/ltoff22x-3.d
new file mode 100644
index 0000000000..724cc59d23
--- /dev/null
+++ b/gas/testsuite/gas/ia64/ltoff22x-3.d
@@ -0,0 +1,11 @@
+# objdump: -r
+# name: ia64 ltoff22x-3
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[\.text\]:
+OFFSET[ ]+TYPE[ ]+VALUE
+0+000 LTOFF22X foo
+0+010 LDXMOV foo
+
+
diff --git a/gas/testsuite/gas/ia64/ltoff22x-3.s b/gas/testsuite/gas/ia64/ltoff22x-3.s
new file mode 100644
index 0000000000..f0ebd10258
--- /dev/null
+++ b/gas/testsuite/gas/ia64/ltoff22x-3.s
@@ -0,0 +1,13 @@
+ .global bar#
+ .data
+bar:
+ data4 0
+ .global foo#
+ foo# = bar#
+ .text
+ addl r3 = @ltoffx(foo#), gp
+ nop.i 0
+ nop.i 0
+ ld8.mov r3 = [r3], foo#
+ nop.i 0
+ nop.i 0
diff --git a/gas/testsuite/gas/ia64/ltoff22x-4.d b/gas/testsuite/gas/ia64/ltoff22x-4.d
new file mode 100644
index 0000000000..feedbae63c
--- /dev/null
+++ b/gas/testsuite/gas/ia64/ltoff22x-4.d
@@ -0,0 +1,11 @@
+# objdump: -r
+# name: ia64 ltoff22x-4
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[\.text\]:
+OFFSET[ ]+TYPE[ ]+VALUE
+0+000 LTOFF22X foo
+0+010 LDXMOV foo
+
+
diff --git a/gas/testsuite/gas/ia64/ltoff22x-4.s b/gas/testsuite/gas/ia64/ltoff22x-4.s
new file mode 100644
index 0000000000..fa43f34682
--- /dev/null
+++ b/gas/testsuite/gas/ia64/ltoff22x-4.s
@@ -0,0 +1,13 @@
+ .text
+ addl r3 = @ltoffx(foo#), gp
+ nop.i 0
+ nop.i 0
+ ld8.mov r3 = [r3], foo#
+ nop.i 0
+ nop.i 0
+ .global foo#
+ foo# = bar#
+ .global bar#
+ .data
+bar:
+ data4 0
diff --git a/gas/testsuite/gas/ia64/ltoff22x-5.d b/gas/testsuite/gas/ia64/ltoff22x-5.d
new file mode 100644
index 0000000000..e6081b45ce
--- /dev/null
+++ b/gas/testsuite/gas/ia64/ltoff22x-5.d
@@ -0,0 +1,11 @@
+# objdump: -r
+# name: ia64 ltoff22x-5
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[\.text\]:
+OFFSET[ ]+TYPE[ ]+VALUE
+0+000 LTOFF22X foo
+0+010 LDXMOV foo
+
+
diff --git a/gas/testsuite/gas/ia64/ltoff22x-5.s b/gas/testsuite/gas/ia64/ltoff22x-5.s
new file mode 100644
index 0000000000..a6c5137b96
--- /dev/null
+++ b/gas/testsuite/gas/ia64/ltoff22x-5.s
@@ -0,0 +1,13 @@
+ .text
+ addl r3 = @ltoffx(foo#), gp
+ nop.i 0
+ nop.i 0
+ ld8.mov r3 = [r3], foo#
+ nop.i 0
+ nop.i 0
+ .global bar#
+ .data
+bar:
+ data4 0
+ .global foo#
+ foo# = bar#