diff options
author | Nick Clifton <nickc@redhat.com> | 2007-12-31 11:29:01 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-12-31 11:29:01 +0000 |
commit | e9e9cead3f03155dd8a2ae851c35066cb3ebfec6 (patch) | |
tree | d014a92928008f2594b0c11a278138cf5bd710cf | |
parent | 2ea37f1c66300870024a9a9393c4b19337363d8b (diff) | |
download | fsf-binutils-gdb-e9e9cead3f03155dd8a2ae851c35066cb3ebfec6.zip fsf-binutils-gdb-e9e9cead3f03155dd8a2ae851c35066cb3ebfec6.tar.gz fsf-binutils-gdb-e9e9cead3f03155dd8a2ae851c35066cb3ebfec6.tar.bz2 |
* ld-elf/flags1.d: Add xfails for ports for which the test will work.
* ld-mn10300/i143317.s: New test - checks linker relaxation when symbols
are in a merged section.
* ld-mn10300/i143317.d: Expected disassembly.
* ld-mn10300/i143317.t: Linker map.
* ld-mn10300/mn10300.exp (mn10300_tests): Add the i143317 test.
-rw-r--r-- | ld/testsuite/ChangeLog | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/flags1.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-mn10300/i143317.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-mn10300/i143317.s | 36 | ||||
-rw-r--r-- | ld/testsuite/ld-mn10300/i143317.t | 31 | ||||
-rw-r--r-- | ld/testsuite/ld-mn10300/mn10300.exp | 8 |
6 files changed, 103 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index fc82529..3f2fc96 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2007-12-31 Nick Clifton <nickc@redhat.com> + + * ld-elf/flags1.d: Add xfails for ports for which the test will + not work. + +2007-12-31 Nick Clifton <nickc@redhat.com> + + * ld-mn10300/i143317.s: New test - checks linker relaxation when + the symbols are in a merged section. + * ld-mn10300/i143317.d: Expected disassembly. + * ld-mn10300/i143317.t: Linker map. + * ld-mn10300/mn10300.exp (mn10300_tests): Add the i143317 test. + 2007-12-24 H.J. Lu <hongjiu.lu@intel.com> PR binutils/5488 diff --git a/ld/testsuite/ld-elf/flags1.d b/ld/testsuite/ld-elf/flags1.d index 6819121..0a96c6c 100644 --- a/ld/testsuite/ld-elf/flags1.d +++ b/ld/testsuite/ld-elf/flags1.d @@ -2,6 +2,13 @@ #ld: -Tflags1.ld #objcopy_linked_file: --set-section-flags .post_text_reserve=contents,alloc,load,readonly,code #readelf: -l --wide +#xfail: "arm*-*-*" "xscale-*-*" +#xfail: "avr-*-*" "dlx-*-*" "h8300-*-*" "m32r-*-*" "msp430-*-*" +#xfail: "*-*-hpux*" +# Fails on the ARM because the .section type character is % rather than @. +# Fails on the AVR, DLX, H8300, M32R and MSP430 because the two sections +# are not merged into one segment. (There is no good reason why they have to be). +# Fails on HPUX systems because the .type pseudo-op behaves differently. #... Program Headers: diff --git a/ld/testsuite/ld-mn10300/i143317.d b/ld/testsuite/ld-mn10300/i143317.d new file mode 100644 index 0000000..ace2831 --- /dev/null +++ b/ld/testsuite/ld-mn10300/i143317.d @@ -0,0 +1,8 @@ + +tmpdir/i143317.x: file format elf32-.* + +Disassembly of section .text: + +0+100c <.text>: +[ ]+100c:[ ]+fa 02 fe 7f[ ]+mov[ ]+\(32766,a2\),d0 +[ ]+1010:[ ]+fa 06 fe 7f[ ]+mov[ ]+\(32766,a2\),d1 diff --git a/ld/testsuite/ld-mn10300/i143317.s b/ld/testsuite/ld-mn10300/i143317.s new file mode 100644 index 0000000..abcc896 --- /dev/null +++ b/ld/testsuite/ld-mn10300/i143317.s @@ -0,0 +1,36 @@ +.section .rodata.str1.1 ,"aMS",@progbits,0x1 +_start: +.string "abcdefgh" +L001: +.string "hogehoge" +L002: +.string "fooooooo" +L003: + +.text +.align 0x02 +mov (L001@GOTOFF,A2),D0 +mov (L004@GOTOFF,A2),D1 + + +.section .rodata.str1.1 ,"aMS",@progbits,0x1 +L006: +.string "" +.string "" +.string "" +.string "%" +.string "" +.string "" +.string "s" +.string "" +L005: +.string "" +.string "" +.string "" +.string "%" +.string "" +.string "" +.string "r" +.string "" +L004: +.string "hogehoge" diff --git a/ld/testsuite/ld-mn10300/i143317.t b/ld/testsuite/ld-mn10300/i143317.t new file mode 100644 index 0000000..47d9262 --- /dev/null +++ b/ld/testsuite/ld-mn10300/i143317.t @@ -0,0 +1,31 @@ +SECTIONS +{ +.bss : +{ +*(.bss) +end = .; +} +. = 0x1000; +.got : { *(.got.plt) *(.got) } +.text : +{ +*(.text) +} +. = 0x8ff5; +.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } +.data : +{ +*(.data) +} +edata = .; +.stac : +{ +*(.stack) +} +.plt : { *(.plt) } +.rela.plt : { *(.rela.plt) } +.rela.dyn : +{ +*(.rela.text) +} +} diff --git a/ld/testsuite/ld-mn10300/mn10300.exp b/ld/testsuite/ld-mn10300/mn10300.exp index edb1470..617ad8a 100644 --- a/ld/testsuite/ld-mn10300/mn10300.exp +++ b/ld/testsuite/ld-mn10300/mn10300.exp @@ -95,6 +95,14 @@ set mn10300_tests { { {objdump -d i135409-5.d} } "i135409-5.x" } + { + "relaxing offsets into a merged string section" + "-Ti143317.t -shared -relax" + "" + { "i143317.s" } + { {objdump -d i143317.d} } + "i143317.x" + } } run_ld_link_tests $mn10300_tests |