aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-05-04 13:19:02 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-05-04 13:19:02 +0000
commitf652615e8c2bba008e66f8eaf11a42650b714086 (patch)
treeb10e04752515f4bafd6ced0dba1df6c81c6c876c /ld
parentc5e2ceadb7216936dcc3d9dec73de31075460765 (diff)
downloadbinutils-f652615e8c2bba008e66f8eaf11a42650b714086.zip
binutils-f652615e8c2bba008e66f8eaf11a42650b714086.tar.gz
binutils-f652615e8c2bba008e66f8eaf11a42650b714086.tar.bz2
bfd/
2005-05-04 H.J. Lu <hongjiu.lu@intel.com> * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New. * bfd-in2.h: Regenerated. * elflink.c (bfd_elf_set_symbol): New. (_bfd_elf_provide_symbol): Call it. (_bfd_elf_provide_section_bound_symbols): New. ld/ 2005-05-04 H.J. Lu <hongjiu.lu@intel.com> * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols): Call _bfd_elf_provide_section_bound_symbols.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/emultempl/elf32.em31
2 files changed, 7 insertions, 29 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 2448124..4e8bae8 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
+ Call _bfd_elf_provide_section_bound_symbols.
+
2005-05-04 Alan Modra <amodra@bigpond.net.au>
* ldemul.c: Include bfdlink.h.
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 641cd63..fb6efb1 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1453,35 +1453,8 @@ gld${EMULATION_NAME}_provide_bound_symbols (const char *sec,
const char *start,
const char *end)
{
- asection *s;
- bfd_vma start_val, end_val;
-
- s = bfd_get_section_by_name (output_bfd, sec);
- if (s != NULL)
- {
- start_val = s->vma;
- end_val = start_val + s->size;
- }
- else
- {
- /* We have to choose those values very carefully. Some targets,
- like alpha, may have relocation overflow with 0. We use the
- first SEC_ALLOC section which isn't SEC_READONLY or the last
- SEC_ALLOC section. */
- start_val = 0;
- for (s = output_bfd->sections; s != NULL; s = s->next)
- {
- if ((s->flags & SEC_ALLOC) != 0)
- {
- start_val = s->vma;
- if ((s->flags & SEC_READONLY) == 0)
- break;
- }
- }
- end_val = start_val;
- }
- _bfd_elf_provide_symbol (&link_info, start, start_val);
- _bfd_elf_provide_symbol (&link_info, end, end_val);
+ asection *s = bfd_get_section_by_name (output_bfd, sec);
+ _bfd_elf_provide_section_bound_symbols (&link_info, s, start, end);
}
/* If not building a shared library, provide