|
|
|
|
Use the platform specific ELF branding expected under FreeBSD.
|
|
|
|
|
This is similar to what the vendor ld(1) does on this platform.
|
|
|
|
|
|
|
|
|
|
Index: bfd/elf.c
|
|
|
|
|
--- bfd/elf.c.orig 2004-05-17 21:35:57 +0200
|
|
|
|
|
+++ bfd/elf.c 2004-11-24 13:21:56 +0100
|
|
|
|
|
@@ -4327,6 +4327,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:
|
|
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Support FreeBSD >= 4.10 by fixing platform detection.
|
|
|
|
|
|
|
|
|
|
Index: bfd/configure
|
|
|
|
|
--- bfd/configure.orig 2004-05-17 21:35:57 +0200
|
|
|
|
|
+++ bfd/configure 2004-11-24 15:14:05 +0100
|
|
|
|
|
@@ -5312,6 +5312,10 @@
|
|
|
|
|
i[3-7]86-*-bsdi)
|
|
|
|
|
COREFILE=
|
|
|
|
|
;;
|
|
|
|
|
+ i[3456]86-*-freebsd4.1[0-9]*)
|
|
|
|
|
+ COREFILE=''
|
|
|
|
|
+ TRAD_HEADER='"hosts/i386bsd.h"'
|
|
|
|
|
+ ;;
|
|
|
|
|
i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234]* | i[3-7]86-*-freebsd*aout*)
|
|
|
|
|
COREFILE=trad-core.lo
|
|
|
|
|
TRAD_HEADER='"hosts/i386bsd.h"'
|
|
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Compare section id, not pointers
|
|
|
|
|
|
|
|
|
|
--- bfd/elflink.c.orig 2004-05-17 21:36:02.000000000 +0200
|
|
|
|
|
+++ bfd/elflink.c 2005-01-07 15:39:43.000000000 +0100
|
|
|
|
|
@@ -2700,7 +2700,7 @@
|
|
|
|
|
return vdiff > 0 ? 1 : -1;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
- long sdiff = h1->root.u.def.section - h2->root.u.def.section;
|
|
|
|
|
+ long sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id;
|
|
|
|
|
if (sdiff != 0)
|
|
|
|
|
return sdiff > 0 ? 1 : -1;
|
|
|
|
|
}
|
|
|
|
|
@@ -3954,7 +3954,7 @@
|
|
|
|
|
i = idx + 1;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
- long sdiff = slook - h->root.u.def.section;
|
|
|
|
|
+ long sdiff = slook->id - h->root.u.def.section->id;
|
|
|
|
|
if (sdiff < 0)
|
|
|
|
|
j = idx;
|
|
|
|
|
else if (sdiff > 0)
|
|
|
|
|
|