diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2017-09-22 17:00:33 -0300 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2017-09-22 17:00:33 -0300 |
commit | 9e0703de64a6dd4deae2ebd569955f14337f2710 (patch) | |
tree | cec45139f1febef6441deabae142c3fb3f2c61f3 /ld/emultempl/avrelf.em | |
parent | 13b9f79a1904081d984a64037af6457c1e3ff7b6 (diff) | |
parent | 43573013c9836f2b91b74b9b29dac35fdb41e06b (diff) | |
download | gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.zip gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.tar.gz gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.tar.bz2 |
Merge remote-tracking branch 'remotes/master' into users/aoliva/SFN
Updated local changes to binutils/testsuite/binutils-all/readelf.exp
to match the unresolved (failed to assemble) messages introduced by
Alan Modra.
Diffstat (limited to 'ld/emultempl/avrelf.em')
-rw-r--r-- | ld/emultempl/avrelf.em | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/ld/emultempl/avrelf.em b/ld/emultempl/avrelf.em index 2072124..acb478f 100644 --- a/ld/emultempl/avrelf.em +++ b/ld/emultempl/avrelf.em @@ -71,6 +71,12 @@ avr_elf_${EMULATION_NAME}_before_allocation (void) gld${EMULATION_NAME}_before_allocation (); + if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) + { + avr_no_stubs = TRUE; + return; + } + /* We only need stubs for avr6, avrxmega6, and avrxmega7. */ if (strcmp ("${EMULATION_NAME}","avr6") && strcmp ("${EMULATION_NAME}","avrxmega6") @@ -108,6 +114,12 @@ avr_elf_create_output_section_statements (void) { flagword flags; + if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) + { + einfo ("%X%P: changing output format whilst linking is not supported\n"); + return; + } + stub_file = lang_add_input_file ("linker stubs", lang_input_file_is_fake_enum, NULL); @@ -204,10 +216,14 @@ avr_finish (void) } abfd = link_info.output_bfd; - if (avr_link_relax) - elf_elfheader (abfd)->e_flags |= EF_AVR_LINKRELAX_PREPARED; - else - elf_elfheader (abfd)->e_flags &= ~EF_AVR_LINKRELAX_PREPARED; + + if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour) + { + if (avr_link_relax) + elf_elfheader (abfd)->e_flags |= EF_AVR_LINKRELAX_PREPARED; + else + elf_elfheader (abfd)->e_flags &= ~EF_AVR_LINKRELAX_PREPARED; + } finish_default (); } |