public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Patch] XFAIL srec tests for avr
@ 2016-05-05 11:31 Senthil Kumar Selvaraj
  2016-05-06 15:25 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Senthil Kumar Selvaraj @ 2016-05-05 11:31 UTC (permalink / raw)
  To: binutils, Nick Clifton, Denis Chertykov

Hi,

  This patch sets the status of tests in srec.exp as XFAIL for the
  avr target.

  The tests have been failing for quite a while (years IIRC).
  Turns out that the code path for srec output does not call
  elf32_avr_relocate_section - that function calls
  avr_final_link_relocate to do custom reloc handling outside of
  what's expressed in the reloc howto table. The srec code path
  calls bfd_perfom_relocation instead, and that function, which only
  looks at howto table information, generates junk values, causing
  the tests to fail.

  Just calling that function from
  elf32_avr_get_relocated_section_contents didn't work - there's some
  state set up through elf32_avr_link_hash_table_create (which
  implements bfd_elf32_bfd_link_hash_table_create hook), and that's
  missing in the srec generation code path. I gave up at this point :)

  An easy and well-known workaround exists - linking to ELF and then
  using objcopy to convert to srec.

  If ok, could someone commit please? I don't have commit access. The
  formatting looks weird - I went by neighboring code's formatting.

Regards
Senthil

ld/ChangeLog

2016-05-05  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
	* ld/testsuite/ld-srec/srec.exp: Mark test as
  XFAIL for avr.


diff --git a/ld/testsuite/ld-srec/srec.exp b/ld/testsuite/ld-srec/srec.exp
index 9832af8..d26b3da 100644
--- a/ld/testsuite/ld-srec/srec.exp
+++ b/ld/testsuite/ld-srec/srec.exp
@@ -249,6 +249,12 @@ proc run_srec_test { test objs } {
 	setup_xfail "sh64*-*-*"
     }
 
+    # The AVR target does not correctly process relocs
+    # when output format is not ELF.
+    if [istarget avr-*-*] {
+	setup_xfail "avr-*-*"
+    }
+
     if {[istarget aarch64*-*-*]   || \
         [istarget arm*-*-*]} {
         # ARM targets cannot convert format in the linker

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch] XFAIL srec tests for avr
  2016-05-05 11:31 [Patch] XFAIL srec tests for avr Senthil Kumar Selvaraj
@ 2016-05-06 15:25 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2016-05-06 15:25 UTC (permalink / raw)
  To: Senthil Kumar Selvaraj, binutils, Denis Chertykov

Hi Senthil,

> ld/ChangeLog
> 
> 2016-05-05  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
> 	* ld/testsuite/ld-srec/srec.exp: Mark test as
>   XFAIL for avr.

Approved and applied.

Cheers
  Nick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-06 15:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05 11:31 [Patch] XFAIL srec tests for avr Senthil Kumar Selvaraj
2016-05-06 15:25 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).