From 66e3eb08a52ba20d3fb468cef04952aafdf534d4 Mon Sep 17 00:00:00 2001 From: Stephen Casner Date: Thu, 28 May 2020 10:11:59 -0700 Subject: Fix all unexpected failures in gas testsuite for pdp11-aout. These failures were caused by the PDP11's mix of little-endian octets in shorts but shorts in big endian order for long or quad so regexps did not match. Also tests used addresses as values in .long which required BRD_RELOC_32 that was not implemented. * gas/config/tc-pdp11.c (md_number_to_chars): Implement .quad * gas/testsuite/gas/all/gas.exp: Select alternate test scripts for pdp11, skip octa test completely. * gas/testsuite/gas/all/eqv-dot-pdp11.s: Identical to eqv-dot.s * gas/testsuite/gas/all/eqv-dot-pdp11.d: Match different octet order. * gas/testsuite/gas/all/cond-pdp11.l: Match different octet order. * bfd/pdp11.c: Implement BRD_RELOC_32 to relocate the low 16 bits of addreses in .long (used in testsuites) and .stab values. --- bfd/ChangeLog | 5 +++++ bfd/pdp11.c | 3 +++ 2 files changed, 8 insertions(+) (limited to 'bfd') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0fe1644..482bf81 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2020-05-28 Stephen Casner + + * pdp11.c: Implement BRD_RELOC_32 to relocate the low 16 bits of + addreses in .long (used in testsuites) and .stab values. + 2020-05-27 H.J. Lu PR ld/22909 diff --git a/bfd/pdp11.c b/bfd/pdp11.c index adcf34d..375fbed 100644 --- a/bfd/pdp11.c +++ b/bfd/pdp11.c @@ -255,6 +255,7 @@ reloc_howto_type howto_table_pdp11[] = /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone */ HOWTO( 0, 0, 1, 16, FALSE, 0, complain_overflow_signed,0,"16", TRUE, 0x0000ffff,0x0000ffff, FALSE), HOWTO( 1, 0, 1, 16, TRUE, 0, complain_overflow_signed,0,"DISP16", TRUE, 0x0000ffff,0x0000ffff, FALSE), +HOWTO( 2, 0, 2, 32, FALSE, 0, complain_overflow_signed,0,"32", TRUE, 0x0000ffff,0x0000ffff, FALSE), }; #define TABLE_SIZE(TABLE) (sizeof(TABLE)/sizeof(TABLE[0])) @@ -276,6 +277,8 @@ NAME (aout, reloc_type_lookup) (bfd * abfd ATTRIBUTE_UNUSED, return &howto_table_pdp11[0]; case BFD_RELOC_16_PCREL: return &howto_table_pdp11[1]; + case BFD_RELOC_32: + return &howto_table_pdp11[2]; default: return NULL; } -- cgit v1.1