+2019-07-24 Alan Modra <amodra@gmail.com>
+
+ * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
+ elf_backend_final_write_processing, don't pass linker arg.
+ (_bfd_elf_final_write_processing): Update prototype.
+ * elf.c (_bfd_elf_write_object_contents): Adjust call.
+ (_bfd_elf_final_write_processing): Return error on incompatible
+ OSABI and has_gnu_osabi. Remove linker arg.
+ * elf-nacl.h (nacl_final_write_processing): Update prototype.
+ * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
+ * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
+ (_bfd_mips_elf_final_write_processing): Likewise.
+ * elf-hppa.h (elf_hppa_final_write_processing): Return status
+ and remove linker arg.
+ * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
+ * elf-nacl.c (nacl_final_write_processing): Likewise.
+ * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
+ * elf32-arc.c (arc_elf_final_write_processing): Likewise.
+ * elf32-arm.c (arm_final_write_processing): Likewise.
+ (elf32_arm_final_write_processing): Likewise.
+ (elf32_arm_nacl_final_write_processing): Likewise.
+ (elf32_arm_vxworks_final_write_processing): Likewise.
+ * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
+ * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
+ * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
+ * elf32-cris.c (cris_elf_final_write_processing): Likewise.
+ * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
+ * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
+ * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
+ * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
+ * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
+ * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
+ * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
+ * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
+ * elf32-pj.c (pj_elf_final_write_processing): Likewise.
+ * elf32-ppc.c (ppc_final_write_processing): Likewise.
+ (ppc_elf_final_write_processing): Likewise.
+ (ppc_elf_vxworks_final_write_processing): Likewise.
+ * elf32-sparc.c (sparc_final_write_processing): Likewise.
+ (elf32_sparc_final_write_processing): Likewise.
+ (elf32_sparc_vxworks_final_write_processing): Likewise.
+ * elf32-v850.c (v850_elf_final_write_processing): Likewise.
+ * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
+ * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
+ * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
+ * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
+ * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
+ (_bfd_mips_elf_final_write_processing): Likewise.
+
2019-07-24 Alan Modra <amodra@gmail.com>
* elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
(bfd *, struct bfd_link_info *);
/* A function to do any final processing needed for the ELF file
- before writing it out. The LINKER argument is TRUE if this BFD
- was created by the ELF backend linker. */
- void (*elf_backend_final_write_processing)
- (bfd *, bfd_boolean linker);
+ before writing it out. */
+ bfd_boolean (*elf_backend_final_write_processing)
+ (bfd *);
/* This function is called by get_program_header_size. It should
return the number of additional program segments which this BFD
extern void _bfd_elf_post_process_headers (bfd *, struct bfd_link_info *);
-extern void _bfd_elf_final_write_processing (bfd *, bfd_boolean);
+extern bfd_boolean _bfd_elf_final_write_processing (bfd *);
extern const bfd_target *bfd_elf32_object_p
(bfd *);
return TRUE;
}
-static void
-elf_hppa_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf_hppa_final_write_processing (bfd *abfd)
{
int mach = bfd_get_mach (abfd);
a step backwards with the ELF
based toolchains. */
| EF_PARISC_TRAPNIL);
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Comparison function for qsort to sort unwind section during a
file. This gets the MN10300 architecture right based on the machine
number. */
-static void
-_bfd_mn10300_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+_bfd_mn10300_elf_final_write_processing (bfd *abfd)
{
unsigned long val;
elf_elfheader (abfd)->e_flags &= ~ (EF_MN10300_MACH);
elf_elfheader (abfd)->e_flags |= val;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
static bfd_boolean
return TRUE;
}
-void
-nacl_final_write_processing (bfd *abfd, bfd_boolean linker)
+bfd_boolean
+nacl_final_write_processing (bfd *abfd)
{
struct elf_segment_map *seg;
for (seg = elf_seg_map (abfd); seg != NULL; seg = seg->next)
free (fill);
}
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
bfd_boolean nacl_modify_segment_map (bfd *, struct bfd_link_info *);
bfd_boolean nacl_modify_program_headers (bfd *, struct bfd_link_info *);
-void nacl_final_write_processing (bfd *, bfd_boolean linker);
+bfd_boolean nacl_final_write_processing (bfd *);
/* Set the sh_link and sh_info fields on the static plt relocation secton. */
-void
-elf_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
+bfd_boolean
+elf_vxworks_final_write_processing (bfd *abfd)
{
asection * sec;
struct bfd_elf_section_data *d;
if (sec)
d->this_hdr.sh_info = elf_section_data (sec)->this_idx;
}
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Add the dynamic entries required by VxWorks. These point to the
bfd_boolean elf_vxworks_emit_relocs
(bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *,
struct elf_link_hash_entry **);
-void elf_vxworks_final_write_processing (bfd *, bfd_boolean);
+bfd_boolean elf_vxworks_final_write_processing (bfd *);
bfd_boolean elf_vxworks_create_dynamic_sections
(bfd *, struct bfd_link_info *, asection **);
bfd_boolean elf_vxworks_add_dynamic_entries (bfd *, struct bfd_link_info *);
|| !_bfd_elf_strtab_emit (abfd, elf_shstrtab (abfd))))
return FALSE;
- (*bed->elf_backend_final_write_processing) (abfd, elf_linker (abfd));
+ if (!(*bed->elf_backend_final_write_processing) (abfd))
+ return FALSE;
if (!bed->s->write_shdrs_and_ehdr (abfd))
return FALSE;
{
}
-void
-_bfd_elf_final_write_processing (bfd *abfd,
- bfd_boolean linker ATTRIBUTE_UNUSED)
+bfd_boolean
+_bfd_elf_final_write_processing (bfd *abfd)
{
Elf_Internal_Ehdr *i_ehdrp; /* ELF file header, internal form. */
/* Set the osabi field to ELFOSABI_GNU if the binary contains
SHF_GNU_MBIND sections or symbols of STT_GNU_IFUNC type or
STB_GNU_UNIQUE binding. */
- if (i_ehdrp->e_ident[EI_OSABI] == ELFOSABI_NONE
- && elf_tdata (abfd)->has_gnu_osabi)
- i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_GNU;
+ if (elf_tdata (abfd)->has_gnu_osabi != 0)
+ {
+ if (i_ehdrp->e_ident[EI_OSABI] == ELFOSABI_NONE)
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_GNU;
+ else if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_GNU
+ && i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_FREEBSD)
+ {
+ if (elf_tdata (abfd)->has_gnu_osabi & elf_gnu_osabi_mbind)
+ _bfd_error_handler (_("GNU_MBIND section is unsupported"));
+ if (elf_tdata (abfd)->has_gnu_osabi & elf_gnu_osabi_ifunc)
+ _bfd_error_handler (_("symbol type STT_GNU_IFUNC is unsupported"));
+ if (elf_tdata (abfd)->has_gnu_osabi & elf_gnu_osabi_unique)
+ _bfd_error_handler (_("symbol binding STB_GNU_UNIQUE is unsupported"));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ }
+ return TRUE;
}
/* The final processing done just before writing out an ARC ELF object file.
This gets the ARC architecture right based on the machine number. */
-static void
-arc_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+arc_elf_final_write_processing (bfd *abfd)
{
unsigned long emf;
int osver = bfd_elf_get_obj_attr_int (abfd, OBJ_ATTR_PROC,
e_flags |= E_ARC_OSABI_V3;
elf_elfheader (abfd)->e_flags |= e_flags;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
#ifdef ARC_ENABLE_DEBUG
}
static void
-arm_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
+arm_final_write_processing (bfd *abfd)
{
bfd_arm_update_notes (abfd, ARM_NOTE_SECTION);
}
-static void
-elf32_arm_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf32_arm_final_write_processing (bfd *abfd)
{
- arm_final_write_processing (abfd, linker);
- _bfd_elf_final_write_processing (abfd, linker);
+ arm_final_write_processing (abfd);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Return TRUE if this is an unwinding table entry. */
&& nacl_modify_segment_map (abfd, info));
}
-static void
-elf32_arm_nacl_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf32_arm_nacl_final_write_processing (bfd *abfd)
{
- arm_final_write_processing (abfd, linker);
- nacl_final_write_processing (abfd, linker);
+ arm_final_write_processing (abfd);
+ return nacl_final_write_processing (abfd);
}
static bfd_vma
return ret;
}
-static void
-elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf32_arm_vxworks_final_write_processing (bfd *abfd)
{
- arm_final_write_processing (abfd, linker);
- elf_vxworks_final_write_processing (abfd, linker);
+ arm_final_write_processing (abfd);
+ return elf_vxworks_final_write_processing (abfd);
}
#undef elf32_bed
file. This gets the AVR architecture right based on the machine
number. */
-static void
-bfd_elf_avr_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+bfd_elf_avr_final_write_processing (bfd *abfd)
{
unsigned long val;
elf_elfheader (abfd)->e_machine = EM_AVR;
elf_elfheader (abfd)->e_flags &= ~ EF_AVR_MACH;
elf_elfheader (abfd)->e_flags |= val;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Set the right machine number. */
/* Set by ld emulation if --data-in-l1. */
bfd_boolean elf32_bfin_data_in_l1 = 0;
-static void
-elf32_bfin_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf32_bfin_final_write_processing (bfd *abfd)
{
if (elf32_bfin_code_in_l1)
elf_elfheader (abfd)->e_flags |= EF_BFIN_CODE_IN_L1;
if (elf32_bfin_data_in_l1)
elf_elfheader (abfd)->e_flags |= EF_BFIN_DATA_IN_L1;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Return TRUE if the name is a local label.
file. This gets the CR16 architecture right based on the machine
number. */
-static void
-_bfd_cr16_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+_bfd_cr16_elf_final_write_processing (bfd *abfd)
{
unsigned long val;
switch (bfd_get_mach (abfd))
val = EM_CR16;
break;
}
- elf_elfheader (abfd)->e_flags |= val;
- _bfd_elf_final_write_processing (abfd, linker);
+ elf_elfheader (abfd)->e_flags |= val;
+ return _bfd_elf_final_write_processing (abfd);
}
/* Mark presence or absence of leading underscore. Set machine type
flags from mach type. */
-static void
-cris_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+cris_elf_final_write_processing (bfd *abfd)
{
unsigned long e_flags = elf_elfheader (abfd)->e_flags;
}
elf_elfheader (abfd)->e_flags = e_flags;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Set the mach type from e_flags value. */
file. We use this opportunity to encode the BFD machine type
into the flags field in the object file. */
-static void
-elf32_h8_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf32_h8_final_write_processing (bfd *abfd)
{
unsigned long val;
elf_elfheader (abfd)->e_flags &= ~ (EF_H8_MACH);
elf_elfheader (abfd)->e_flags |= val;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Return nonzero if ABFD represents a valid H8 ELF object file; also
/* Set machine type flags just before file is written out. */
-static void
-lm32_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+lm32_elf_final_write_processing (bfd *abfd)
{
elf_elfheader (abfd)->e_machine = EM_LATTICEMICO32;
elf_elfheader (abfd)->e_flags &=~ EF_LM32_MACH;
default:
abort ();
}
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a
/* Store the machine number in the flags field. */
-static void
-m32r_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+m32r_elf_final_write_processing (bfd *abfd)
{
unsigned long val;
elf_elfheader (abfd)->e_flags &=~ EF_M32R_ARCH;
elf_elfheader (abfd)->e_flags |= val;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Function to keep M32R specific file flags. */
/* Somewhat reverse of elf32_m68k_object_p, this sets the e_flag
field based on the machine number. */
-static void
-elf_m68k_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf_m68k_final_write_processing (bfd *abfd)
{
int mach = bfd_get_mach (abfd);
unsigned long e_flags = elf_elfheader (abfd)->e_flags;
}
elf_elfheader (abfd)->e_flags = e_flags;
}
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Keep m68k-specific flags in the ELF header. */
#include "elf32-target.h"
/* Implement elf_backend_final_write_processing for VxWorks. */
-static void
-mips_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+mips_vxworks_final_write_processing (bfd *abfd)
{
- _bfd_mips_final_write_processing (abfd, linker);
- elf_vxworks_final_write_processing (abfd, linker);
+ _bfd_mips_final_write_processing (abfd);
+ return elf_vxworks_final_write_processing (abfd);
}
#undef TARGET_LITTLE_SYM
file. This gets the MSP430 architecture right based on the machine
number. */
-static void
-bfd_elf_msp430_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+bfd_elf_msp430_final_write_processing (bfd *abfd)
{
unsigned long val;
elf_elfheader (abfd)->e_machine = EM_MSP430;
elf_elfheader (abfd)->e_flags &= ~EF_MSP430_MACH;
elf_elfheader (abfd)->e_flags |= val;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Set the right machine number. */
/* Store the machine number in the flags field. */
-static void
-nds32_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+nds32_elf_final_write_processing (bfd *abfd)
{
unsigned long val;
static unsigned int cur_mach = 0;
elf_elfheader (abfd)->e_flags &= ~EF_NDS_ARCH;
elf_elfheader (abfd)->e_flags |= val;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Function to keep NDS32 specific file flags. */
/* Store the machine number in the flags field. */
-static void
-or1k_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+or1k_elf_final_write_processing (bfd *abfd)
{
switch (bfd_get_mach (abfd))
{
elf_elfheader (abfd)->e_flags |= EF_OR1K_NODELAY;
break;
}
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
static bfd_boolean
/* Take this moment to fill in the special picoJava bits in the
e_flags field. */
-static void
-pj_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+pj_elf_final_write_processing (bfd *abfd)
{
elf_elfheader (abfd)->e_flags |= EF_PICOJAVA_ARCH;
elf_elfheader (abfd)->e_flags |= EF_PICOJAVA_GNUCALLS;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
#define TARGET_BIG_SYM pj_elf32_vec
/* Finally we can generate the output section. */
static void
-ppc_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
+ppc_final_write_processing (bfd *abfd)
{
bfd_byte *buffer;
asection *asec;
apuinfo_list_finish ();
}
-static void
-ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+ppc_elf_final_write_processing (bfd *abfd)
{
- ppc_final_write_processing (abfd, linker);
- _bfd_elf_final_write_processing (abfd, linker);
+ ppc_final_write_processing (abfd);
+ return _bfd_elf_final_write_processing (abfd);
}
\f
static bfd_boolean
return ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp);
}
-static void
-ppc_elf_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+ppc_elf_vxworks_final_write_processing (bfd *abfd)
{
- ppc_final_write_processing (abfd, linker);
- elf_vxworks_final_write_processing (abfd, linker);
+ ppc_final_write_processing (abfd);
+ return elf_vxworks_final_write_processing (abfd);
}
/* On VxWorks, we emit relocations against _PROCEDURE_LINKAGE_TABLE_, so
We need to set the e_machine field appropriately. */
static void
-sparc_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
+sparc_final_write_processing (bfd *abfd)
{
switch (bfd_get_mach (abfd))
{
}
}
-static void
-elf32_sparc_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf32_sparc_final_write_processing (bfd *abfd)
{
- sparc_final_write_processing (abfd, linker);
- _bfd_elf_final_write_processing (abfd, linker);
+ sparc_final_write_processing (abfd);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Used to decide how to sort relocs in an optimal manner for the
/* A final_write_processing hook that does both the SPARC- and VxWorks-
specific handling. */
-static void
-elf32_sparc_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf32_sparc_vxworks_final_write_processing (bfd *abfd)
{
- sparc_final_write_processing (abfd, linker);
- elf_vxworks_final_write_processing (abfd, linker);
+ sparc_final_write_processing (abfd);
+ return elf_vxworks_final_write_processing (abfd);
}
#undef TARGET_BIG_SYM
/* Store the machine number in the flags field. */
-static void
-v850_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+v850_elf_final_write_processing (bfd *abfd)
{
unsigned long val;
default:
break;
}
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Function to keep V850 specific file flags. */
}
-static void
-elf32_xc16x_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf32_xc16x_final_write_processing (bfd *abfd)
{
unsigned long val;
}
elf_elfheader (abfd)->e_flags |= val;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
static unsigned long
file. This gets the Xtensa architecture right based on the machine
number. */
-static void
-elf_xtensa_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf_xtensa_final_write_processing (bfd *abfd)
{
int mach;
unsigned long val = elf_elfheader (abfd)->e_flags & EF_XTENSA_MACH;
elf_elfheader (abfd)->e_flags &= ~EF_XTENSA_MACH;
elf_elfheader (abfd)->e_flags |= val;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* The final processing done just before writing out a VMS IA-64 ELF
object file. */
-static void
-elf64_vms_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elf64_vms_final_write_processing (bfd *abfd)
{
Elf_Internal_Shdr *hdr;
asection *s;
elf_elfheader (abfd)->e_flags = flags;
elf_flags_init (abfd) = TRUE;
}
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
static bfd_boolean
/* The final processing done just before writing out an IA-64 ELF
object file. */
-static void
-elfNN_ia64_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+elfNN_ia64_final_write_processing (bfd *abfd)
{
Elf_Internal_Shdr *hdr;
asection *s;
elf_elfheader(abfd)->e_flags = flags;
elf_flags_init (abfd) = TRUE;
}
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
/* Hook called by the linker routine which adds symbols from an object
number. This is used by both the 32-bit and the 64-bit ABI. */
void
-_bfd_mips_final_write_processing (bfd *abfd,
- bfd_boolean linker ATTRIBUTE_UNUSED)
+_bfd_mips_final_write_processing (bfd *abfd)
{
unsigned int i;
Elf_Internal_Shdr **hdrpp;
}
}
-void
-_bfd_mips_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+bfd_boolean
+_bfd_mips_elf_final_write_processing (bfd *abfd)
{
- _bfd_mips_final_write_processing (abfd, linker);
- _bfd_elf_final_write_processing (abfd, linker);
+ _bfd_mips_final_write_processing (abfd);
+ return _bfd_elf_final_write_processing (abfd);
}
\f
/* When creating an IRIX5 executable, we need REGINFO and RTPROC
extern bfd_boolean _bfd_mips_elf_sort_relocs_p
(asection *);
extern void _bfd_mips_final_write_processing
- (bfd *, bfd_boolean);
-extern void _bfd_mips_elf_final_write_processing
- (bfd *, bfd_boolean);
+ (bfd *);
+extern bfd_boolean _bfd_mips_elf_final_write_processing
+ (bfd *);
extern int _bfd_mips_elf_additional_program_headers
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mips_elf_modify_segment_map
+2019-07-24 Alan Modra <amodra@gmail.com>
+
+ * config/obj-elf.c (obj_elf_section, obj_elf_type): Set has_gnu_osabi.
+ * testsuite/gas/elf/section12a.d: Update xfails.
+ * testsuite/gas/elf/section12b.d: Likewise.
+
2019-07-24 Alan Modra <amodra@gmail.com>
* testsuite/gas/elf/section12a.d: xfail visium and cloudabi.
&& bed->elf_osabi != ELFOSABI_FREEBSD)
as_bad (_("GNU_MBIND section is supported only by GNU "
"and FreeBSD targets"));
+ elf_tdata (stdoutput)->has_gnu_osabi |= elf_gnu_osabi_mbind;
}
elf_section_flags (now_seg) |= gnu_attr;
&& bed->elf_osabi != ELFOSABI_FREEBSD)
as_bad (_("symbol type \"%s\" is supported only by GNU "
"and FreeBSD targets"), type_name);
+ elf_tdata (stdoutput)->has_gnu_osabi |= elf_gnu_osabi_ifunc;
type = BSF_FUNCTION | BSF_GNU_INDIRECT_FUNCTION;
}
else if (strcmp (type_name, "gnu_unique_object") == 0)
else if (bed->elf_osabi != ELFOSABI_GNU)
as_bad (_("symbol type \"%s\" is supported only by GNU targets"),
type_name);
+ elf_tdata (stdoutput)->has_gnu_osabi |= elf_gnu_osabi_unique;
type = BSF_OBJECT | BSF_GNU_UNIQUE;
}
#ifdef md_elf_symbol_type
#readelf: -Sg --wide
#name: mbind sections
# A number of targets do not support SHF_GNU_MBIND
-#xfail: msp430-*-* visium-*-*
+#xfail: arm*-*-netbsdelf* arm*-*-nto* msp430-*-* visium-*-*
#xfail: *-*-hpux* *-*-cloudabi
#...
# expected below.
#xfail: rx-*-*
# A number of targets do not support SHF_GNU_MBIND
-#xfail: msp430-*-* visium-*-*
+#xfail: arm*-*-netbsdelf* arm*-*-nto* msp430-*-* visium-*-*
#xfail: *-*-hpux* *-*-cloudabi
#...