|
|
|
|
Index: bfd/elf-eh-frame.c
|
|
|
|
|
--- bfd/elf-eh-frame.c.orig 2018-01-13 14:31:15.000000000 +0100
|
|
|
|
|
+++ bfd/elf-eh-frame.c 2018-05-10 11:55:50.641641000 +0200
|
|
|
|
|
@@ -1042,10 +1042,12 @@
|
|
|
|
|
goto success;
|
|
|
|
|
|
|
|
|
|
free_no_table:
|
|
|
|
|
+#if 0
|
|
|
|
|
(*info->callbacks->einfo)
|
|
|
|
|
/* xgettext:c-format */
|
|
|
|
|
(_("%P: error in %B(%A); no .eh_frame_hdr table will be created.\n"),
|
|
|
|
|
abfd, sec);
|
|
|
|
|
+#endif
|
|
|
|
|
hdr_info->u.dwarf.table = FALSE;
|
|
|
|
|
if (sec_info)
|
|
|
|
|
free (sec_info);
|
|
|
|
|
Index: bfd/elf.c
|
|
|
|
|
--- bfd/elf.c.orig 2018-01-13 14:31:15.000000000 +0100
|
|
|
|
|
+++ bfd/elf.c 2018-05-10 11:55:50.642768000 +0200
|
|
|
|
|
@@ -2443,6 +2443,11 @@
|
|
|
|
|
ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
|
|
|
|
|
goto success;
|
|
|
|
|
|
|
|
|
|
+ case SHT_SUNW_syminfo:
|
|
|
|
|
+ /* case SHT_SUNW_signature: conflicts with new SHT_GNU_HASH in Binutils 2.18 */
|
|
|
|
|
+ case SHT_SUNW_dof:
|
|
|
|
|
+ goto success;
|
|
|
|
|
+
|
|
|
|
|
case SHT_SHLIB:
|
|
|
|
|
goto success;
|
|
|
|
|
|
|
|
|
|
@@ -6179,6 +6184,12 @@
|
|
|
|
|
else
|
|
|
|
|
i_ehdrp->e_type = ET_REL;
|
|
|
|
|
|
|
|
|
|
+ /* OpenPKG platform branding BEGIN */
|
|
|
|
|
+#if defined(OPENPKG_OS_FREEBSD)
|
|
|
|
|
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
|
|
|
|
|
+#endif
|
|
|
|
|
+ /* OpenPKG platform branding END */
|
|
|
|
|
+
|
|
|
|
|
switch (bfd_get_arch (abfd))
|
|
|
|
|
{
|
|
|
|
|
case bfd_arch_unknown:
|
|
|
|
|
Index: bfd/elfnn-aarch64.c
|
|
|
|
|
--- bfd/elfnn-aarch64.c.orig 2018-01-17 12:29:21.000000000 +0100
|
|
|
|
|
+++ bfd/elfnn-aarch64.c 2018-05-10 11:59:46.423305000 +0200
|
|
|
|
|
@@ -4385,7 +4385,9 @@
|
|
|
|
|
off = h->got.offset;
|
|
|
|
|
BFD_ASSERT (off != (bfd_vma) - 1);
|
|
|
|
|
if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
|
|
|
|
|
- || (bfd_link_pic (info)
|
|
|
|
|
+ || ((bfd_link_pic (info)
|
|
|
|
|
+ || (!bfd_link_relocatable (info)
|
|
|
|
|
+ && (info->export_dynamic || info->dynamic)))
|
|
|
|
|
&& SYMBOL_REFERENCES_LOCAL (info, h))
|
|
|
|
|
|| (ELF_ST_VISIBILITY (h->other)
|
|
|
|
|
&& h->root.type == bfd_link_hash_undefweak))
|
|
|
|
|
@@ -7074,10 +7076,19 @@
|
|
|
|
|
#if ARCH_SIZE == 64
|
|
|
|
|
case BFD_RELOC_AARCH64_32:
|
|
|
|
|
#endif
|
|
|
|
|
- if (bfd_link_pic (info)
|
|
|
|
|
- && (sec->flags & SEC_ALLOC) != 0
|
|
|
|
|
- && (sec->flags & SEC_READONLY) != 0)
|
|
|
|
|
+ if (bfd_link_pic (info) && (sec->flags & SEC_ALLOC) != 0)
|
|
|
|
|
{
|
|
|
|
|
+ if (h != NULL
|
|
|
|
|
+ /* This is an absolute symbol. It represents a value instead
|
|
|
|
|
+ of an address. */
|
|
|
|
|
+ && ((h->root.type == bfd_link_hash_defined
|
|
|
|
|
+ && bfd_is_abs_section (h->root.u.def.section))
|
|
|
|
|
+ /* This is an undefined symbol. */
|
|
|
|
|
+ || h->root.type == bfd_link_hash_undefined))
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ /* For local symbols, defined global symbols in a non-ABS section,
|
|
|
|
|
+ it is assumed that the value is an address. */
|
|
|
|
|
int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START;
|
|
|
|
|
_bfd_error_handler
|
|
|
|
|
/* xgettext:c-format */
|
|
|
|
|
@@ -8915,6 +8926,14 @@
|
|
|
|
|
+ h->root.u.def.section->output_section->vma
|
|
|
|
|
+ h->root.u.def.section->output_offset);
|
|
|
|
|
}
|
|
|
|
|
+ else if (!bfd_link_relocatable (info)
|
|
|
|
|
+ && (info->export_dynamic || info->dynamic)
|
|
|
|
|
+ && SYMBOL_REFERENCES_LOCAL (info, h))
|
|
|
|
|
+ {
|
|
|
|
|
+ BFD_ASSERT ((h->got.offset & 1) != 0);
|
|
|
|
|
+ rela.r_info = ELFNN_R_INFO (h->dynindx, AARCH64_R (GLOB_DAT));
|
|
|
|
|
+ rela.r_addend = 0;
|
|
|
|
|
+ }
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
do_glob_dat:
|
|
|
|
|
Index: bfd/elfxx-sparc.c
|
|
|
|
|
--- bfd/elfxx-sparc.c.orig 2018-01-26 09:36:27.000000000 +0100
|
|
|
|
|
+++ bfd/elfxx-sparc.c 2018-05-10 11:55:50.647043000 +0200
|
|
|
|
|
@@ -2912,12 +2912,14 @@
|
|
|
|
|
Elf_Internal_Rela *relend;
|
|
|
|
|
int num_relocs;
|
|
|
|
|
bfd_boolean is_vxworks_tls;
|
|
|
|
|
+ const struct elf_backend_data *bed;
|
|
|
|
|
|
|
|
|
|
htab = _bfd_sparc_elf_hash_table (info);
|
|
|
|
|
BFD_ASSERT (htab != NULL);
|
|
|
|
|
symtab_hdr = &elf_symtab_hdr (input_bfd);
|
|
|
|
|
sym_hashes = elf_sym_hashes (input_bfd);
|
|
|
|
|
local_got_offsets = elf_local_got_offsets (input_bfd);
|
|
|
|
|
+ bed = get_elf_backend_data (output_bfd);
|
|
|
|
|
|
|
|
|
|
if (elf_hash_table (info)->hgot == NULL)
|
|
|
|
|
got_base = 0;
|
|
|
|
|
@@ -3534,6 +3536,8 @@
|
|
|
|
|
bfd_set_error (bfd_error_bad_value);
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
+ if (bed->elf_osabi == ELFOSABI_FREEBSD)
|
|
|
|
|
+ outrel.r_addend -= osec->vma;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
outrel.r_info = SPARC_ELF_R_INFO (htab, rel, indx,
|
|
|
|
|
Index: gas/asintl.h
|
|
|
|
|
--- gas/asintl.h.orig 2018-01-13 14:31:15.000000000 +0100
|
|
|
|
|
+++ gas/asintl.h 2018-05-10 11:55:50.644055000 +0200
|
|
|
|
|
@@ -20,6 +20,11 @@
|
|
|
|
|
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
|
|
|
|
02110-1301, USA. */
|
|
|
|
|
|
|
|
|
|
+#ifndef ENABLE_NLS
|
|
|
|
|
+# define _LIBINTL_H
|
|
|
|
|
+# define _LIBGETTEXT_H
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
#ifdef HAVE_LOCALE_H
|
|
|
|
|
# ifndef ENABLE_NLS
|
|
|
|
|
/* The Solaris version of locale.h always includes libintl.h. If we have
|
|
|
|
|
Index: include/elf/common.h
|
|
|
|
|
--- include/elf/common.h.orig 2018-01-13 14:31:16.000000000 +0100
|
|
|
|
|
+++ include/elf/common.h 2018-05-10 11:55:50.644340000 +0200
|
|
|
|
|
@@ -509,6 +509,9 @@
|
|
|
|
|
#define SHT_SUNW_verdef 0x6ffffffd /* Versions defined by file */
|
|
|
|
|
#define SHT_SUNW_verneed 0x6ffffffe /* Versions needed by file */
|
|
|
|
|
#define SHT_SUNW_versym 0x6fffffff /* Symbol versions */
|
|
|
|
|
+#define SHT_SUNW_syminfo 0x6ffffffc /* Symbol information */
|
|
|
|
|
+#define SHT_SUNW_signature 0x6ffffff6 /* Solaris Cryptographic Framework: Digital Signature */
|
|
|
|
|
+#define SHT_SUNW_dof 0x6ffffff4 /* Solaris DTrace Object Format */
|
|
|
|
|
|
|
|
|
|
#define SHT_GNU_verdef SHT_SUNW_verdef
|
|
|
|
|
#define SHT_GNU_verneed SHT_SUNW_verneed
|
|
|
|
|
Index: ld/Makefile.in
|
|
|
|
|
--- ld/Makefile.in.orig 2018-01-27 16:03:10.000000000 +0100
|
|
|
|
|
+++ ld/Makefile.in 2018-05-10 11:55:50.645039000 +0200
|
|
|
|
|
@@ -446,7 +446,7 @@
|
|
|
|
|
# We put the scripts in the directory $(scriptdir)/ldscripts.
|
|
|
|
|
# We can't put the scripts in $(datadir) because the SEARCH_DIR
|
|
|
|
|
# directives need to be different for native and cross linkers.
|
|
|
|
|
-scriptdir = $(tooldir)/lib
|
|
|
|
|
+scriptdir = $(libdir)
|
|
|
|
|
BASEDIR = $(srcdir)/..
|
|
|
|
|
BFDDIR = $(BASEDIR)/bfd
|
|
|
|
|
INCDIR = $(BASEDIR)/include
|
|
|
|
|
Index: ld/ld.h
|
|
|
|
|
--- ld/ld.h.orig 2018-01-13 14:31:16.000000000 +0100
|
|
|
|
|
+++ ld/ld.h 2018-05-10 11:55:50.645187000 +0200
|
|
|
|
|
@@ -21,6 +21,11 @@
|
|
|
|
|
#ifndef LD_H
|
|
|
|
|
#define LD_H
|
|
|
|
|
|
|
|
|
|
+#ifndef ENABLE_NLS
|
|
|
|
|
+# define _LIBINTL_H
|
|
|
|
|
+# define _LIBGETTEXT_H
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
#ifdef HAVE_LOCALE_H
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef SEEK_CUR
|
|
|
|
|
Index: libiberty/fibheap.c
|
|
|
|
|
--- libiberty/fibheap.c.orig 2018-01-13 14:31:16.000000000 +0100
|
|
|
|
|
+++ libiberty/fibheap.c 2018-05-10 11:55:50.645338000 +0200
|
|
|
|
|
@@ -34,8 +34,11 @@
|
|
|
|
|
#include "libiberty.h"
|
|
|
|
|
#include "fibheap.h"
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
+#ifdef LONG_MIN
|
|
|
|
|
#define FIBHEAPKEY_MIN LONG_MIN
|
|
|
|
|
+#else
|
|
|
|
|
+#define FIBHEAPKEY_MIN (-0x7fffffffL - 1)
|
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
static void fibheap_ins_root (fibheap_t, fibnode_t);
|
|
|
|
|
static void fibheap_rem_root (fibheap_t, fibnode_t);
|