memspec. Make "processed" a bitfield.
(lang_data_statement_type, lang_reloc_statement_type): Rename
output_vma to output_offset.
* ldlang.c (lang_output_section_statement_lookup_1): Init
all_input_readonly. Don't init memspec.
(init_os): Remove incorrect comment.
(print_data_statement, print_reloc_statement): Adjust for
lang_data_statement_type and lang_reloc_statement_type change.
(lang_size_sections_1, lang_add_reloc): Likewise.
* ldwrite.c (build_link_order): Likewise.
+2005-11-03 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.h (lang_output_section_statement_type): Rearrange. Remove
+ memspec. Make "processed" a bitfield.
+ (lang_data_statement_type, lang_reloc_statement_type): Rename
+ output_vma to output_offset.
+ * ldlang.c (lang_output_section_statement_lookup_1): Init
+ all_input_readonly. Don't init memspec.
+ (init_os): Remove incorrect comment.
+ (print_data_statement, print_reloc_statement): Adjust for
+ lang_data_statement_type and lang_reloc_statement_type change.
+ (lang_size_sections_1, lang_add_reloc): Likewise.
+ * ldwrite.c (build_link_order): Likewise.
+
2005-10-30 Mark Mitchell <mark@codesourcery.com>
* lexsup.c (help): Document "@FILE".
lookup->bfd_section = NULL;
lookup->processed = FALSE;
lookup->constraint = constraint;
+ lookup->all_input_readonly = FALSE;
lookup->ignored = FALSE;
lookup->sectype = normal_section;
lookup->addr_tree = NULL;
lang_list_init (&lookup->children);
- lookup->memspec = NULL;
lookup->flags = 0;
lookup->subsection_alignment = -1;
lookup->section_alignment = -1;
output_bfd->xvec->name, s->name);
}
s->bfd_section->output_section = s->bfd_section;
-
- /* We initialize an output sections output offset to minus its own
- vma to allow us to output a section through itself. */
s->bfd_section->output_offset = 0;
if (!command_line.reduce_memory_overheads)
{
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
- addr = data->output_vma;
+ addr = data->output_offset;
if (data->output_section != NULL)
addr += data->output_section->vma;
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
- addr = reloc->output_vma;
+ addr = reloc->output_offset;
if (reloc->output_section != NULL)
addr += reloc->output_section->vma;
{
unsigned int size = 0;
- s->data_statement.output_vma =
+ s->data_statement.output_offset =
dot - output_section_statement->bfd_section->vma;
s->data_statement.output_section =
output_section_statement->bfd_section;
{
int size;
- s->reloc_statement.output_vma =
+ s->reloc_statement.output_offset =
dot - output_section_statement->bfd_section->vma;
s->reloc_statement.output_section =
output_section_statement->bfd_section;
p->addend_value = 0;
p->output_section = NULL;
- p->output_vma = 0;
+ p->output_offset = 0;
}
lang_assignment_statement_type *
typedef struct lang_output_section_statement_struct
{
lang_statement_header_type header;
- union etree_union *addr_tree;
lang_statement_list_type children;
- const char *memspec;
struct lang_output_section_statement_struct *next;
const char *name;
-
- bfd_boolean processed;
-
asection *bfd_section;
- flagword flags; /* Or together of all input sections. */
- enum section_type sectype;
lang_memory_region_type *region;
lang_memory_region_type *lma_region;
- size_t block_value;
fill_type *fill;
-
- int subsection_alignment; /* Alignment of components. */
- int section_alignment; /* Alignment of start of section. */
- int constraint;
- unsigned int all_input_readonly : 1;
- unsigned int ignored : 1;
-
+ union etree_union *addr_tree;
union etree_union *load_base;
/* If non-null, an expression to evaluate after setting the section's
union etree_union *update_dot_tree;
lang_output_section_phdr_list *phdrs;
+
+ unsigned int block_value;
+ int subsection_alignment; /* Alignment of components. */
+ int section_alignment; /* Alignment of start of section. */
+ int constraint;
+ flagword flags;
+ enum section_type sectype;
+ unsigned int processed : 1;
+ unsigned int all_input_readonly : 1;
+ unsigned int ignored : 1;
} lang_output_section_statement_type;
typedef struct
union etree_union *exp;
bfd_vma value;
asection *output_section;
- bfd_vma output_vma;
+ bfd_vma output_offset;
} lang_data_statement_type;
/* Generate a reloc in the output file. */
/* Output section where reloc should be performed. */
asection *output_section;
- /* VMA within output section. */
- bfd_vma output_vma;
+ /* Offset within output section. */
+ bfd_vma output_offset;
} lang_reloc_statement_type;
typedef struct lang_input_statement_struct
einfo (_("%P%F: bfd_new_link_order failed\n"));
link_order->type = bfd_data_link_order;
- link_order->offset = statement->data_statement.output_vma;
+ link_order->offset = statement->data_statement.output_offset;
link_order->u.data.contents = xmalloc (QUAD_SIZE);
value = statement->data_statement.value;
if (link_order == NULL)
einfo (_("%P%F: bfd_new_link_order failed\n"));
- link_order->offset = rs->output_vma;
+ link_order->offset = rs->output_offset;
link_order->size = bfd_get_reloc_size (rs->howto);
link_order->u.reloc.p = xmalloc (sizeof (struct bfd_link_order_reloc));