diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-06-19 13:05:55 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-06-19 13:05:55 +0000 |
commit | 293a01244194269a44cd69c0733b9c3df4e4baa4 (patch) | |
tree | 2e91b2a99b29e7dc3f326389ad236baeb0c4a68c /ld/testsuite/ld-ia64 | |
parent | 30ff741fa7e8c8d8ca94f7e43917e5fe10ce1017 (diff) | |
download | gdb-293a01244194269a44cd69c0733b9c3df4e4baa4.zip gdb-293a01244194269a44cd69c0733b9c3df4e4baa4.tar.gz gdb-293a01244194269a44cd69c0733b9c3df4e4baa4.tar.bz2 |
bfd/
2007-06-19 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4590
* elfxx-ia64.c (sort_dyn_sym_info): Keep the valid got_offset
when removing duplicated entries.
(get_dyn_sym_info): Initialize the got_offset field to -1.
Update call to sort_dyn_sym_info.
(elfNN_ia64_relocate_section): Call sort_dyn_sym_info to sort
array of addend and remove duplicates.
ld/testsuite/
2007-06-19 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4590
* ld-ia64/merge1.d: New.
* ld-ia64/merge1.s: Likewise.
* ld-ia64/merge2.d: Likewise.
* ld-ia64/merge2.s: Likewise.
* ld-ia64/merge3.d: Likewise.
* ld-ia64/merge3.s: Likewise.
* ld-ia64/merge4.d: Likewise.
* ld-ia64/merge4.s: Likewise.
* ld-ia64/merge5.d: Likewise.
* ld-ia64/merge5.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-ia64')
-rw-r--r-- | ld/testsuite/ld-ia64/merge1.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-ia64/merge1.s | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-ia64/merge2.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-ia64/merge2.s | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-ia64/merge3.d | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-ia64/merge3.s | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-ia64/merge4.d | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-ia64/merge4.s | 21 | ||||
-rw-r--r-- | ld/testsuite/ld-ia64/merge5.d | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-ia64/merge5.s | 24 |
10 files changed, 147 insertions, 0 deletions
diff --git a/ld/testsuite/ld-ia64/merge1.d b/ld/testsuite/ld-ia64/merge1.d new file mode 100644 index 0000000..39882b8 --- /dev/null +++ b/ld/testsuite/ld-ia64/merge1.d @@ -0,0 +1,10 @@ +#source: merge1.s +#as: -x +#ld: -shared +#objdump: -d + +#... +0+1e0 <.text>: +[ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;; +[ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1 +[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; diff --git a/ld/testsuite/ld-ia64/merge1.s b/ld/testsuite/ld-ia64/merge1.s new file mode 100644 index 0000000..8998db4 --- /dev/null +++ b/ld/testsuite/ld-ia64/merge1.s @@ -0,0 +1,12 @@ + .section .rodata.str1.8,"aMS", 1 +.LC1: .string "foo" +.LC2: .string "foo" + .section .data.rel.local,"aw" + .quad .LC2 + .section .rodata,"a" +.LC3: .string "bar" + .balign 8 + .space 0x400000 + .text + addl r12=@ltoffx(.LC1),r1 ;; + addl r12=@ltoffx(.LC3),r1 ;; diff --git a/ld/testsuite/ld-ia64/merge2.d b/ld/testsuite/ld-ia64/merge2.d new file mode 100644 index 0000000..dde3d09 --- /dev/null +++ b/ld/testsuite/ld-ia64/merge2.d @@ -0,0 +1,10 @@ +#source: merge2.s +#as: -x +#ld: -shared +#objdump: -d + +#... +0+1e0 <.text>: +[ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;; +[ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1 +[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; diff --git a/ld/testsuite/ld-ia64/merge2.s b/ld/testsuite/ld-ia64/merge2.s new file mode 100644 index 0000000..6c85ac2 --- /dev/null +++ b/ld/testsuite/ld-ia64/merge2.s @@ -0,0 +1,12 @@ + .section .rodata.str1.8,"aMS", 1 +.LC2: .string "foo" +.LC1: .string "foo" + .section .data.rel.local,"aw" + .quad .LC2 + .section .rodata,"a" +.LC3: .string "bar" + .balign 8 + .space 0x400000 + .text + addl r12=@ltoffx(.LC1),r1 ;; + addl r12=@ltoffx(.LC3),r1 ;; diff --git a/ld/testsuite/ld-ia64/merge3.d b/ld/testsuite/ld-ia64/merge3.d new file mode 100644 index 0000000..d0163f3 --- /dev/null +++ b/ld/testsuite/ld-ia64/merge3.d @@ -0,0 +1,13 @@ +#source: merge3.s +#as: -x +#ld: -shared +#objdump: -d + +#... +0+210 <.text>: +[ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;; +[ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1 +[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; +[ ]*[a-f0-9]+: 01 60 60 02 00 24 \[MII\] addl r12=24,r1 +[ ]*[a-f0-9]+: 00 00 00 02 00 00 nop.i 0x0 +[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; diff --git a/ld/testsuite/ld-ia64/merge3.s b/ld/testsuite/ld-ia64/merge3.s new file mode 100644 index 0000000..2442701 --- /dev/null +++ b/ld/testsuite/ld-ia64/merge3.s @@ -0,0 +1,16 @@ + .section .rodata.str1.8,"aMS", 1 +.LC1: .string "foo" +.LC2: .string "foo" +.LC3: .string "bar" +.LC4: .string "bar" + .section .data.rel.local,"aw" + .quad .LC2 + .quad .LC3 + .section .rodata,"a" +.LC5: .string "mumble" + .balign 8 + .space 0x400000 + .text + addl r12=@ltoffx(.LC1),r1 ;; + addl r12=@ltoffx(.LC4),r1 ;; + addl r12=@ltoffx(.LC5),r1 ;; diff --git a/ld/testsuite/ld-ia64/merge4.d b/ld/testsuite/ld-ia64/merge4.d new file mode 100644 index 0000000..0ed5621 --- /dev/null +++ b/ld/testsuite/ld-ia64/merge4.d @@ -0,0 +1,13 @@ +#source: merge4.s +#as: -x +#ld: -shared +#objdump: -d + +#... +0+240 <.text>: +[ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;; +[ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1 +[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; +[ ]*[a-f0-9]+: 0b 60 c0 02 00 24 \[MMI\] addl r12=48,r1;; +[ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1 +[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; diff --git a/ld/testsuite/ld-ia64/merge4.s b/ld/testsuite/ld-ia64/merge4.s new file mode 100644 index 0000000..c23b4d0 --- /dev/null +++ b/ld/testsuite/ld-ia64/merge4.s @@ -0,0 +1,21 @@ + .section .rodata.str1.8,"aMS", 1 +.LC1: .string "foo" +.LC2: .string "foo" +.LC3: .string "bar" +.LC4: .string "bar" +.LC5: .string "baz" +.LC6: .string "baz" + .section .data.rel.local,"aw" + .quad .LC2 + .quad .LC4 + .quad .LC5 + .section .rodata,"a" +.LC7: .string "mumble" + .balign 8 + .space 0x400000 + .text + addl r12=@ltoffx(.LC1),r1 ;; + addl r12=@ltoffx(.LC3),r1 ;; + addl r12=@ltoffx(.LC6),r1 ;; + addl r12=@ltoffx(.LC7),r1 ;; + diff --git a/ld/testsuite/ld-ia64/merge5.d b/ld/testsuite/ld-ia64/merge5.d new file mode 100644 index 0000000..3adfa55 --- /dev/null +++ b/ld/testsuite/ld-ia64/merge5.d @@ -0,0 +1,16 @@ +#source: merge5.s +#as: -x +#ld: -shared +#objdump: -d + +#... +0+270 <.text>: +[ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;; +[ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1 +[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; +[ ]*[a-f0-9]+: 0b 60 a0 02 00 24 \[MMI\] addl r12=40,r1;; +[ ]*[a-f0-9]+: c0 c0 05 00 48 00 addl r12=56,r1 +[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; +[ ]*[a-f0-9]+: 01 60 60 02 00 24 \[MII\] addl r12=24,r1 +[ ]*[a-f0-9]+: 00 00 00 02 00 00 nop.i 0x0 +[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; diff --git a/ld/testsuite/ld-ia64/merge5.s b/ld/testsuite/ld-ia64/merge5.s new file mode 100644 index 0000000..81428c4 --- /dev/null +++ b/ld/testsuite/ld-ia64/merge5.s @@ -0,0 +1,24 @@ + .section .rodata.str1.8,"aMS", 1 +.LC1: .string "foo" +.LC2: .string "foo" +.LC3: .string "bar" +.LC4: .string "bar" +.LC5: .string "bar" +.LC6: .string "bar" +.LC7: .string "baz" +.LC8: .string "baz" + .section .data.rel.local,"aw" + .quad .LC2 + .quad .LC4 + .quad .LC6 + .quad .LC7 + .section .rodata,"a" +.LC9: .string "mumble" + .balign 8 + .space 0x400000 + .text + addl r12=@ltoffx(.LC1),r1 ;; + addl r12=@ltoffx(.LC3),r1 ;; + addl r12=@ltoffx(.LC5),r1 ;; + addl r12=@ltoffx(.LC8),r1 ;; + addl r12=@ltoffx(.LC9),r1 ;; |