aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog10
-rw-r--r--ld/emultempl/armelf.em11
-rw-r--r--ld/emultempl/armelf_oabi.em2
-rw-r--r--ld/ld.texinfo6
4 files changed, 27 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 6ff7498..0afd3f6 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,13 @@
+2004-04-01 Paul Brook <paul@codesourcery.com>
+
+ * emultempl/armelf.em (byteswap_code): Add.
+ (arm_elf_before_allocation): Pass extra parameter.
+ (PARSE_AND_LIST_PROLOGUE): Add OPTION_BE8.
+ (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add be8.
+ (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_BE8.
+ * emultempl/armelf_oabi.em: Pass extra parameter.
+ * ld.texinfo: Document --be8.
+
2004-03-30 Stan Shebs <shebs@apple.com>
Remove long-obsolete MPW support.
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index 0c051ad..beeb40c 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -27,6 +27,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
static int no_pipeline_knowledge = 0;
static char *thumb_entry_symbol = NULL;
static bfd *bfd_for_interwork;
+static int byteswap_code = 0;
static void
gld${EMULATION_NAME}_before_parse (void)
@@ -117,7 +118,8 @@ arm_elf_before_allocation (void)
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, & link_info,
- no_pipeline_knowledge))
+ no_pipeline_knowledge,
+ byteswap_code))
{
/* xgettext:c-format */
einfo (_("Errors encountered processing file %s"), is->filename);
@@ -184,6 +186,7 @@ EOF
#
PARSE_AND_LIST_PROLOGUE='
#define OPTION_THUMB_ENTRY 301
+#define OPTION_BE8 302
'
PARSE_AND_LIST_SHORTOPTS=p
@@ -191,11 +194,13 @@ PARSE_AND_LIST_SHORTOPTS=p
PARSE_AND_LIST_LONGOPTS='
{ "no-pipeline-knowledge", no_argument, NULL, '\'p\''},
{ "thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY},
+ { "be8", no_argument, NULL, OPTION_BE8},
'
PARSE_AND_LIST_OPTIONS='
fprintf (file, _(" -p --no-pipeline-knowledge Stop the linker knowing about the pipeline length\n"));
fprintf (file, _(" --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"));
+ fprintf (file, _(" --be8 Oputput BE8 format image\n"));
'
PARSE_AND_LIST_ARGS_CASES='
@@ -206,6 +211,10 @@ PARSE_AND_LIST_ARGS_CASES='
case OPTION_THUMB_ENTRY:
thumb_entry_symbol = optarg;
break;
+
+ case OPTION_BE8:
+ byteswap_code = 1;
+ break;
'
# We have our own after_open and before_allocation functions, but they call
diff --git a/ld/emultempl/armelf_oabi.em b/ld/emultempl/armelf_oabi.em
index d75c658..8ff2ad1 100644
--- a/ld/emultempl/armelf_oabi.em
+++ b/ld/emultempl/armelf_oabi.em
@@ -68,7 +68,7 @@ gld${EMULATION_NAME}_before_allocation (void)
{
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
- if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info, 0))
+ if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info, 0, 0))
{
/* xgettext:c-format */
einfo (_("Errors encountered processing file %s"), is->filename);
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 4310c12..f6bd9ff 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -4762,6 +4762,12 @@ But it also sets the bottom bit of the address, so that it can be
branched to using a BX instruction, and the program will start
executing in Thumb mode straight away.
+@cindex BE8
+@kindex --be8
+The @samp{--be8} switch instructs @command{ld} to generate BE8 format
+executables. This option is only valid when linking big-endian objects.
+The resulting image will contain big-endian data and little-endian code.
+
@ifclear GENERIC
@lowersections
@end ifclear