mirror of
https://github.com/bebbo/amigaos-cross-toolchain.git
synced 2025-12-08 22:38:24 +00:00
40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
--- binutils-2.9.1/ld/ldctor.c 1998-05-01 17:48:48.000000000 +0200
|
|
+++ binutils-2.9.1/ld/ldctor.c 2012-08-04 12:43:35.000000000 +0200
|
|
@@ -144,10 +144,13 @@
|
|
/* If the symbol is defined, we may have been invoked from
|
|
collect, and the sets may already have been built, so we do
|
|
not do anything. */
|
|
- if (p->h->type == bfd_link_hash_defined
|
|
- || p->h->type == bfd_link_hash_defweak)
|
|
+ /* dgv -- libnix v1.1 uses absolute sets that are also explicitly
|
|
+ defined in the library so that the sets need to be build even
|
|
+ if the symbol is defined */
|
|
+ if ((output_bfd->xvec->flavour != bfd_target_amiga_flavour) &&
|
|
+ (p->h->type == bfd_link_hash_defined
|
|
+ || p->h->type == bfd_link_hash_defweak))
|
|
continue;
|
|
-
|
|
/* For each set we build:
|
|
set:
|
|
.long number_of_elements
|
|
@@ -239,10 +242,17 @@
|
|
if (e->name != NULL)
|
|
minfo ("%T\n", e->name);
|
|
else
|
|
- minfo ("%G\n", e->section->owner, e->section, e->value);
|
|
+ if (e->section->owner)
|
|
+ minfo ("%G\n", e->section->owner, e->section, e->value);
|
|
+ else
|
|
+ minfo ("%s\n", "** ABS **");
|
|
}
|
|
|
|
- if (link_info.relocateable)
|
|
+ /* dgv -- on the amiga, we want the constructors to be relocateable
|
|
+ objects. However, this should be arranged somewhere else (FIXME) */
|
|
+ if (link_info.relocateable ||
|
|
+ (output_bfd->xvec->flavour == bfd_target_amiga_flavour &&
|
|
+ e->section != bfd_abs_section_ptr))
|
|
lang_add_reloc (p->reloc, howto, e->section, e->name,
|
|
exp_intop (e->value));
|
|
else
|