aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/emulparams/armsymbian.sh1
-rw-r--r--ld/emultempl/armelf.em18
3 files changed, 23 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 5124bb6..c36ee74 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-13 Paul Brook <paul@codesourcery.com>
+
+ * emulparams/armsymbian.sh: Set TARGET1_IS_REL.
+ * emultempl/armelf.em: Use TARGET1_IS_REL. Add --target1-{rel,abs}.
+
2004-09-07 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated with autconfig 2.13.
diff --git a/ld/emulparams/armsymbian.sh b/ld/emulparams/armsymbian.sh
index 630024e..ce3a963 100644
--- a/ld/emulparams/armsymbian.sh
+++ b/ld/emulparams/armsymbian.sh
@@ -4,6 +4,7 @@ GENERATE_COMBRELOC_SCRIPT=1
OUTPUT_FORMAT="elf32-littlearm-symbian"
BIG_OUTPUT_FORMAT="elf32-bigarm-symbian"
LITTLE_OUTPUT_FORMAT="$OUTPUT_FORMAT"
+TARGET1_IS_REL=1
# This value should match ELF_MAXPAGESIZE in BFD. Otherwise, elf.c
# will not place read-write sections in a separate ELF segment from
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index 5505f12..6a690f8 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -28,6 +28,7 @@ static int no_pipeline_knowledge = 0;
static char *thumb_entry_symbol = NULL;
static bfd *bfd_for_interwork;
static int byteswap_code = 0;
+static int target1_is_rel = 0${TARGET1_IS_REL};
static void
gld${EMULATION_NAME}_before_parse (void)
@@ -120,7 +121,8 @@ arm_elf_before_allocation (void)
{
if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, & link_info,
no_pipeline_knowledge,
- byteswap_code))
+ byteswap_code,
+ target1_is_rel))
{
/* xgettext:c-format */
einfo (_("Errors encountered processing file %s"), is->filename);
@@ -188,6 +190,8 @@ EOF
PARSE_AND_LIST_PROLOGUE='
#define OPTION_THUMB_ENTRY 301
#define OPTION_BE8 302
+#define OPTION_TARGET1_REL 303
+#define OPTION_TARGET1_ABS 304
'
PARSE_AND_LIST_SHORTOPTS=p
@@ -196,12 +200,16 @@ 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},
+ { "target1-rel", no_argument, NULL, OPTION_TARGET1_REL},
+ { "target1-abs", no_argument, NULL, OPTION_TARGET1_ABS},
'
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"));
+ fprintf (file, _(" --target1-rel Interpret R_ARM_TARGET1 as R_ARM_REL32\n"));
+ fprintf (file, _(" --target1-abs Interpret R_ARM_TARGET1 as R_ARM_ABS32\n"));
'
PARSE_AND_LIST_ARGS_CASES='
@@ -216,6 +224,14 @@ PARSE_AND_LIST_ARGS_CASES='
case OPTION_BE8:
byteswap_code = 1;
break;
+
+ case OPTION_TARGET1_REL:
+ target1_is_rel = 1;
+ break;
+
+ case OPTION_TARGET1_ABS:
+ target1_is_rel = 0;
+ break;
'
# We have our own after_open and before_allocation functions, but they call