/* ldexp.h -
- Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
enum {
exp_dataseg_none,
exp_dataseg_align_seen,
+ exp_dataseg_relro_seen,
exp_dataseg_end_seen,
+ exp_dataseg_relro_adjust,
exp_dataseg_adjust
} phase;
- bfd_vma base, end, pagesize;
+ bfd_vma base, min_base, relro_end, end, pagesize, maxpagesize;
} 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
(etree_type *, fill_type *, char *, lang_phase_type);
bfd_vma exp_get_abs_int
(etree_type *, int, char *, lang_phase_type);
-bfd_vma align_n
- (bfd_vma, bfd_vma);
#endif