From db187cb9de63e1190a8a409e0371ee74aeadbb5c Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Thu, 8 Jul 2010 06:22:24 +0000 Subject: [PATCH] * config/tc-arm.c (tc_gen_reloc): Add BFD_RELOC_ARM_T32_OFFSET_IMM error message. testsuite/ * gas/arm/reloc-bad.d: New. * gas/arm/reloc-bad.s: New. * gas/arm/reloc-bad.l: New. --- gas/ChangeLog | 5 +++++ gas/config/tc-arm.c | 1 + gas/testsuite/ChangeLog | 6 ++++++ gas/testsuite/gas/arm/reloc-bad.d | 2 ++ gas/testsuite/gas/arm/reloc-bad.l | 3 +++ gas/testsuite/gas/arm/reloc-bad.s | 5 +++++ 6 files changed, 22 insertions(+) create mode 100644 gas/testsuite/gas/arm/reloc-bad.d create mode 100644 gas/testsuite/gas/arm/reloc-bad.l create mode 100644 gas/testsuite/gas/arm/reloc-bad.s diff --git a/gas/ChangeLog b/gas/ChangeLog index 1a22a35854..a67cce38ad 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2010-07-08 Daniel Gutson + + * config/tc-arm.c (tc_gen_reloc): Add BFD_RELOC_ARM_T32_OFFSET_IMM + error message. + 2010-07-06 Maciej W. Rozycki * config/tc-mips.c (mips_frob_file): Use symbol_same_p to match diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 67b36d5999..33d38ad469 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -21235,6 +21235,7 @@ tc_gen_reloc (asection *section, fixS *fixp) case BFD_RELOC_ARM_SWI: type = "SWI"; break; case BFD_RELOC_ARM_MULTI: type = "MULTI"; break; case BFD_RELOC_ARM_CP_OFF_IMM: type = "CP_OFF_IMM"; break; + case BFD_RELOC_ARM_T32_OFFSET_IMM: type = "T32_OFFSET_IMM"; break; case BFD_RELOC_ARM_T32_CP_OFF_IMM: type = "T32_CP_OFF_IMM"; break; case BFD_RELOC_ARM_THUMB_ADD: type = "THUMB_ADD"; break; case BFD_RELOC_ARM_THUMB_SHIFT: type = "THUMB_SHIFT"; break; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 2d89bb823c..e9dbfe7fa4 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-07-08 Daniel Gutson + + * gas/arm/reloc-bad.d: New. + * gas/arm/reloc-bad.s: New. + * gas/arm/reloc-bad.l: New. + 2010-07-06 Maciej W. Rozycki * gas/mips/elf-rel27.d: New test for HI16/LO16 relocation diff --git a/gas/testsuite/gas/arm/reloc-bad.d b/gas/testsuite/gas/arm/reloc-bad.d new file mode 100644 index 0000000000..4866871498 --- /dev/null +++ b/gas/testsuite/gas/arm/reloc-bad.d @@ -0,0 +1,2 @@ +#name: Invalid relocations +#error-output: reloc-bad.l diff --git a/gas/testsuite/gas/arm/reloc-bad.l b/gas/testsuite/gas/arm/reloc-bad.l new file mode 100644 index 0000000000..a95bb996a0 --- /dev/null +++ b/gas/testsuite/gas/arm/reloc-bad.l @@ -0,0 +1,3 @@ +[^:]*: Assembler messages: +[^:]*:5: Error: internal_relocation \(type: OFFSET_IMM\) not fixed up +[^:]*:3: Error: cannot represent T32_OFFSET_IMM relocation in this object file format diff --git a/gas/testsuite/gas/arm/reloc-bad.s b/gas/testsuite/gas/arm/reloc-bad.s new file mode 100644 index 0000000000..88c45c8a2e --- /dev/null +++ b/gas/testsuite/gas/arm/reloc-bad.s @@ -0,0 +1,5 @@ +.syntax unified +.thumb +ldr r0, 0 +.arm +ldr r0, 0