Add link info argument.
* elf32-i370.c (elf_backend_modify_segment_map): Likewise.
* elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
* elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
* elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
* elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
* elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
* elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
* elf.c (assign_file_positions_except_relocs,
assign_file_positions_for_segments): Likewise. Adjust calls.
+2003-11-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
+ Add link info argument.
+ * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
+ * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
+ * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
+ * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
+ * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
+ * elf.c (assign_file_positions_except_relocs,
+ assign_file_positions_for_segments): Likewise. Adjust calls.
+
2003-11-27 Mark Kettenis <kettenis@gnu.org>
* elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
/* This function is called to modify an existing segment map in a
backend specific fashion. */
bfd_boolean (*elf_backend_modify_segment_map)
- (bfd *);
+ (bfd *, struct bfd_link_info *);
/* This function is called during section gc to discover the section a
particular relocation refers to. */
#include "libiberty.h"
static int elf_sort_sections (const void *, const void *);
-static bfd_boolean assign_file_positions_except_relocs (bfd *);
+static bfd_boolean assign_file_positions_except_relocs (bfd *, struct bfd_link_info *);
static bfd_boolean prep_headers (bfd *);
static bfd_boolean swap_out_syms (bfd *, struct bfd_strtab_hash **, int) ;
static bfd_boolean elfcore_read_notes (bfd *, file_ptr, bfd_size_type) ;
/* sh_offset is set in assign_file_positions_except_relocs. */
shstrtab_hdr->sh_addralign = 1;
- if (!assign_file_positions_except_relocs (abfd))
+ if (!assign_file_positions_except_relocs (abfd, link_info))
return FALSE;
if (link_info == NULL && bfd_get_symcount (abfd) > 0)
the file header, and writes out the program headers. */
static bfd_boolean
-assign_file_positions_for_segments (bfd *abfd)
+assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
{
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
unsigned int count;
if (bed->elf_backend_modify_segment_map)
{
- if (! (*bed->elf_backend_modify_segment_map) (abfd))
+ if (! (*bed->elf_backend_modify_segment_map) (abfd, link_info))
return FALSE;
}
We also don't set the positions of the .symtab and .strtab here. */
static bfd_boolean
-assign_file_positions_except_relocs (bfd *abfd)
+assign_file_positions_except_relocs (bfd *abfd,
+ struct bfd_link_info *link_info)
{
struct elf_obj_tdata * const tdata = elf_tdata (abfd);
Elf_Internal_Ehdr * const i_ehdrp = elf_elfheader (abfd);
/* Assign file positions for the loaded sections based on the
assignment of sections to segments. */
- if (! assign_file_positions_for_segments (abfd))
+ if (! assign_file_positions_for_segments (abfd, link_info))
return FALSE;
/* Assign file positions for the other sections. */
#define elf_backend_additional_program_headers \
(int (*) PARAMS ((bfd *))) i370_noop
#define elf_backend_modify_segment_map \
- (bfd_boolean (*) PARAMS ((bfd *))) i370_noop
+ (bfd_boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) i370_noop
#include "elf32-target.h"
/* Modify the segment map if needed. */
static bfd_boolean
-ppc_elf_modify_segment_map (bfd *abfd ATTRIBUTE_UNUSED)
+ppc_elf_modify_segment_map (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return TRUE;
}
static bfd_boolean elf_xtensa_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean elf_xtensa_modify_segment_map
- PARAMS ((bfd *));
+ PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean elf_xtensa_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
this and it probably ought to be moved into elf.c as well. */
static bfd_boolean
-elf_xtensa_modify_segment_map (abfd)
+elf_xtensa_modify_segment_map (abfd, info)
bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
{
struct elf_segment_map **m_p;
PARAMS ((bfd *));
static bfd_boolean elf64_hppa_modify_segment_map
- PARAMS ((bfd *));
+ PARAMS ((bfd *, struct bfd_link_info *));
static enum elf_reloc_type_class elf64_hppa_reloc_type_class
PARAMS ((const Elf_Internal_Rela *));
existence of a .interp section. */
static bfd_boolean
-elf64_hppa_modify_segment_map (abfd)
+elf64_hppa_modify_segment_map (abfd, info)
bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
{
struct elf_segment_map *m;
asection *s;
static int elfNN_ia64_additional_program_headers
PARAMS ((bfd *abfd));
static bfd_boolean elfNN_ia64_modify_segment_map
- PARAMS ((bfd *));
+ PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean elfNN_ia64_is_local_label_name
PARAMS ((bfd *abfd, const char *name));
static bfd_boolean elfNN_ia64_dynamic_symbol_p
}
static bfd_boolean
-elfNN_ia64_modify_segment_map (abfd)
+elfNN_ia64_modify_segment_map (abfd, info)
bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
{
struct elf_segment_map *m, **pm;
Elf_Internal_Shdr *hdr;
/* Modify the segment map for an IRIX5 executable. */
bfd_boolean
-_bfd_mips_elf_modify_segment_map (abfd)
+_bfd_mips_elf_modify_segment_map (abfd, info)
bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
{
asection *s;
struct elf_segment_map *m, **pm;
extern int _bfd_mips_elf_additional_program_headers
PARAMS ((bfd *));
extern bfd_boolean _bfd_mips_elf_modify_segment_map
- PARAMS ((bfd *));
+ PARAMS ((bfd *, struct bfd_link_info *));
extern asection * _bfd_mips_elf_gc_mark_hook
PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
struct elf_link_hash_entry *, Elf_Internal_Sym *));