2
0
mirror of https://github.com/bebbo/amigaos-cross-toolchain.git synced 2025-12-08 22:38:24 +00:00
Files
amigaos-cross-toolchain6/patches/binutils-2.9.1/bfd/linker.c.diff
Krystian Bacławski da2d7bde0e Update patches.
2012-08-04 13:01:59 +02:00

63 lines
1.9 KiB
Diff

--- binutils-2.9.1/bfd/linker.c 1998-05-01 17:48:12.000000000 +0200
+++ binutils-2.9.1/bfd/linker.c 2012-08-04 12:43:35.000000000 +0200
@@ -428,7 +428,8 @@
static boolean default_fill_link_order
PARAMS ((bfd *, struct bfd_link_info *, asection *,
struct bfd_link_order *));
-static boolean default_indirect_link_order
+/*Amiga hack - used in amigaoslink.c so must be global */
+/*static*/ boolean default_indirect_link_order
PARAMS ((bfd *, struct bfd_link_info *, asection *,
struct bfd_link_order *, boolean));
@@ -1196,8 +1197,17 @@
h->u.c.size = size;
power = bfd_log2 (size);
- if (power > 4)
- power = 4;
+ /* For the amiga, we don't want an alignment bigger than
+ 2**2. Doing this here is a horribly kludgy, but IMHO the
+ max power alignment really should be target-dependant so
+ that we wouldn't have to do this -- daniel */
+ if (bfd_get_flavour(abfd) == bfd_target_amiga_flavour) {
+ if (power > 2)
+ power = 2;
+ }
+ else
+ if (power > 4)
+ power = 4;
h->u.c.p->alignment_power = power;
if (p->section == bfd_com_section_ptr)
@@ -1658,8 +1668,18 @@
unsigned int power;
power = bfd_log2 (value);
- if (power > 4)
- power = 4;
+ /* For the amiga, we don't want an alignment bigger than
+ 2**2. Doing this here is a horribly kludgy, but IMHO
+ the max power alignment really should be
+ target-dependant so that we wouldn't have to do this --
+ daniel */
+ if (bfd_get_flavour(abfd) == bfd_target_amiga_flavour) {
+ if (power > 2)
+ power = 2;
+ }
+ else
+ if (power > 4)
+ power = 4;
h->u.c.p->alignment_power = power;
}
@@ -2626,7 +2646,7 @@
/* Default routine to handle a bfd_indirect_link_order. */
-static boolean
+/*static*/ boolean
default_indirect_link_order (output_bfd, info, output_section, link_order,
generic_linker)
bfd *output_bfd;