summaryrefslogtreecommitdiff
path: root/ld/ldexp.h
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-10-26 18:41:52 +0000
committerMark Mitchell <mark@codesourcery.com>2004-10-26 18:41:52 +0000
commitcfb3e4d8b66aa8ca991fbf6d2d4c4dd51b307554 (patch)
treeb38e6800e558f5979142022adca9352e7600f5fe /ld/ldexp.h
parent9cb2013bb8112200bb47b8f46edfe9ba5487161d (diff)
downloadbinutils-redhat-cfb3e4d8b66aa8ca991fbf6d2d4c4dd51b307554.tar.gz
* Makefile.in (earmsymbian.c): Depend on armbpabi.sc, not elf.sc.
* ldexp.h (segment_type): New type. (segments): New variable. * ldexp.c (segments): New variable. (exp_print_token): Handle SEGMENT_START. (fold_binary): Likewise. * ldgram.y (SEGMENT_START): Declare it as a token. (exp): Handle SEGMENT_START. * ldlang.h (lang_address_statement_type): Add segment field. (lang_section_start): Change prototype. * ldlang.c (map_input_to_output_sections): Do not process section assignments if a corresponding SEGMENT_START has already been seen. (lang_section_start): Add segment parameter. * ldlex.l (SEGMENT_START): Add it. * lexsup.c (seg_segment_start): New function. (parse_args): Use it for -Tbss, -Tdata, and -Ttext. * ld.texinfo (SEGMENT_START): Document it. * emulparams/armsymbian.sh (EMBEDDED): Set it. * scripttempl/armbpabi.sc: Use SEGMENT_START to control segment base addresses. Do not map relocations. * NEWS: Mention SEGMENT_START.
Diffstat (limited to 'ld/ldexp.h')
-rw-r--r--ld/ldexp.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/ld/ldexp.h b/ld/ldexp.h
index a90f1ef7b7..addf83424a 100644
--- a/ld/ldexp.h
+++ b/ld/ldexp.h
@@ -103,6 +103,22 @@ extern struct exp_data_seg {
bfd_vma base, relro_end, end, pagesize;
} exp_data_seg;
+/* A maps from a segment name to a base address. */
+typedef struct segment_struct {
+ /* The next segment in the linked list. */
+ struct segment_struct *next;
+ /* The name of the sgement. */
+ const char *name;
+ /* The base address for the segment. */
+ bfd_vma value;
+ /* True if a SEGMENT_START directive corresponding to this segment
+ has been seen. */
+ bfd_boolean used;
+} segment_type;
+
+/* The segments specified by the user on the command-line. */
+extern segment_type *segments;
+
typedef struct _fill_type fill_type;
etree_type *exp_intop