# This shell script emits a C file. -*- C -*-
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
# Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
bfd_byte *insn_contents = NULL;
unsigned entry_count;
unsigned entry;
+ Elf_Internal_Shdr *rel_hdr;
Elf_Internal_Rela *internal_relocs = NULL;
unsigned reloc_count;
/* The entry size and size must be set to allow the linker to compute
the number of relocations since it does not use reloc_count. */
- elf_section_data (prop_sec)->rel_hdr.sh_entsize =
- sizeof (Elf32_External_Rela);
- elf_section_data (prop_sec)->rel_hdr.sh_size =
- elf_section_data (insn_sec)->rel_hdr.sh_size;
+ rel_hdr = _bfd_elf_single_rel_hdr (prop_sec);
+ rel_hdr->sh_entsize = sizeof (Elf32_External_Rela);
+ rel_hdr->sh_size = _bfd_elf_single_rel_hdr (insn_sec)->sh_size;
if (prop_contents == NULL && prop_sec->size != 0)
{
extern lang_statement_list_type constructor_list;
-/* Begin verbatim code from ldlang.c:
- the following are copied from ldlang.c because they are defined
- there statically. */
-
-static void
-lang_for_each_statement_worker (void (*func) (lang_statement_union_type *),
- lang_statement_union_type *s)
-{
- for (; s != (lang_statement_union_type *) NULL; s = s->header.next)
- {
- func (s);
-
- switch (s->header.type)
- {
- case lang_constructors_statement_enum:
- lang_for_each_statement_worker (func, constructor_list.head);
- break;
- case lang_output_section_statement_enum:
- lang_for_each_statement_worker
- (func,
- s->output_section_statement.children.head);
- break;
- case lang_wild_statement_enum:
- lang_for_each_statement_worker
- (func,
- s->wild_statement.children.head);
- break;
- case lang_group_statement_enum:
- lang_for_each_statement_worker (func,
- s->group_statement.children.head);
- break;
- case lang_data_statement_enum:
- case lang_reloc_statement_enum:
- case lang_object_symbols_statement_enum:
- case lang_output_statement_enum:
- case lang_target_statement_enum:
- case lang_input_section_enum:
- case lang_input_statement_enum:
- case lang_assignment_statement_enum:
- case lang_padding_statement_enum:
- case lang_address_statement_enum:
- case lang_fill_statement_enum:
- break;
- default:
- FAIL ();
- break;
- }
- }
-}
-
-/* End of verbatim code from ldlang.c. */
-
-
static reloc_deps_section *
xtensa_get_section_deps (const reloc_deps_graph *deps ATTRIBUTE_UNUSED,
asection *sec)
bfd_vma target_addr = e->tgt->output_offset & ~3;
if (l32r_addr < target_addr)
{
+ fflush (stdout);
fprintf (stderr, "Warning: "
"l32r target section before l32r\n");
+ fflush (stderr);
return FALSE;
}
etree_type *name_op = exp_nameop (NAME, ".");
etree_type *addend_op = exp_intop (1 << xtensa_page_power);
etree_type *add_op = exp_binop ('+', name_op, addend_op);
- etree_type *assign_op = exp_assop ('=', ".", add_op);
+ etree_type *assign_op = exp_assign (".", add_op);
lang_assignment_statement_type *assign_stmt;
lang_statement_union_type *assign_union;