aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-07-22 18:53:23 +0000
committerIan Lance Taylor <ian@airs.com>1994-07-22 18:53:23 +0000
commit7c6da9cade1c47d725fac11ddc9aaf921f85c22d (patch)
tree50cc77e306108de96cf41f87a4c731bdbae277c6 /bfd/elf.c
parent36c6e8c37fc1ebc698b8d260c6ef09fe2d18ea69 (diff)
downloadfsf-binutils-gdb-7c6da9cade1c47d725fac11ddc9aaf921f85c22d.zip
fsf-binutils-gdb-7c6da9cade1c47d725fac11ddc9aaf921f85c22d.tar.gz
fsf-binutils-gdb-7c6da9cade1c47d725fac11ddc9aaf921f85c22d.tar.bz2
* aoutx.h (aout_link_check_ar_symbols): When changing a symbol to
common, set the alignment. (aout_link_add_symbols): Restrict the alignment of a common symbol to the alignment power given by the architecture. * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize align. Do initialize copy_offset. * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use copy_offset field rather than align field. Get alignment using bfd_log2 rather than switch. * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use copy_offset, not align. * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Likewise.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 3e1e712..6fece72 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -197,7 +197,7 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name)
flags |= SEC_READONLY;
if ((hdr->sh_flags & SHF_EXECINSTR) != 0)
flags |= SEC_CODE;
- else if ((flags & SEC_ALLOC) != 0)
+ else if ((flags & SEC_LOAD) != 0)
flags |= SEC_DATA;
/* The debugging sections appear to be recognized only by name, not
@@ -331,10 +331,10 @@ _bfd_elf_link_hash_newfunc (entry, table, string)
/* Set local fields. */
ret->indx = -1;
ret->size = 0;
- ret->align = 0;
ret->dynindx = -1;
ret->dynstr_index = 0;
ret->weakdef = NULL;
+ ret->copy_offset = 0;
ret->type = STT_NOTYPE;
ret->elf_link_hash_flags = 0;
}
@@ -383,3 +383,15 @@ _bfd_elf_link_hash_table_create (abfd)
return &ret->root;
}
+
+/* This is a hook for the ELF emulation code in the generic linker to
+ tell the backend linker what file name to use for the DT_NEEDED
+ entry for a dynamic object. */
+
+void
+bfd_elf_set_dt_needed_name (abfd, name)
+ bfd *abfd;
+ const char *name;
+{
+ elf_dt_needed_name (abfd) = name;
+}