diff options
Diffstat (limited to 'contrib/binutils/ld')
-rw-r--r-- | contrib/binutils/ld/ChangeLog | 26 | ||||
-rw-r--r-- | contrib/binutils/ld/Makefile.am | 6 | ||||
-rw-r--r-- | contrib/binutils/ld/Makefile.in | 6 | ||||
-rw-r--r-- | contrib/binutils/ld/configure.tgt | 8 | ||||
-rw-r--r-- | contrib/binutils/ld/emultempl/elf32.em | 6 | ||||
-rw-r--r-- | contrib/binutils/ld/ldlang.c | 13 |
6 files changed, 58 insertions, 7 deletions
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog index 9f69d0e..df9f3c5 100644 --- a/contrib/binutils/ld/ChangeLog +++ b/contrib/binutils/ld/ChangeLog @@ -1,3 +1,29 @@ +2001-07-19 David O'Brien <obrien@FreeBSD.org> + + * emultempl/elf32.em: Do not assuming that contents of the buffer + returned from basename function will remain unchanged accross other + function calls. + +2001-07-19 Nick Clifton <nickc@cambridge.redhat.com> + + * ldlang.c (lang_leave_overlay): If a region is specified assign + it to all sections inside the overlay unless they have been + assigned to the own, non-default, memory region. + +2001-07-14 matthew green <mrg@eterna.com.au> + + * configure.tgt (i386-*-netbsdelf*): New target. + (i386-*-netbsd*): Set targ_extra_emuls to `elf_i386' + +2001-06-27 Alan Modra <amodra@bigpond.net.au> + + * emulparams/hppa64linux.sh: New file. + * configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh + * Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o + (ehppa64linux.c): Add rule to make it. + Run "make dep-am". + * Makefile.in: Regenerate. + 2001-06-07 Andreas Jaeger <aj@suse.de> * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase. diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am index d6a2d63..916a883 100644 --- a/contrib/binutils/ld/Makefile.am +++ b/contrib/binutils/ld/Makefile.am @@ -248,7 +248,8 @@ ALL_64_EMULATIONS = \ eelf64bmip.o \ eelf64btsmip.o \ eelf64ltsmip.o \ - eelf64hppa.o + eelf64hppa.o \ + ehppa64linux.o ALL_EMUL_EXTRA_OFILES = \ deffilep.o \ @@ -560,6 +561,9 @@ ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} hppalinux "$(tdir_hppalinux)" +ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)" ei386aout.c: $(srcdir)/emulparams/i386aout.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} i386aout "$(tdir_i386aout)" diff --git a/contrib/binutils/ld/Makefile.in b/contrib/binutils/ld/Makefile.in index f79e360..b4db3e8 100644 --- a/contrib/binutils/ld/Makefile.in +++ b/contrib/binutils/ld/Makefile.in @@ -357,7 +357,8 @@ ALL_64_EMULATIONS = \ eelf64bmip.o \ eelf64btsmip.o \ eelf64ltsmip.o \ - eelf64hppa.o + eelf64hppa.o \ + ehppa64linux.o ALL_EMUL_EXTRA_OFILES = \ @@ -1274,6 +1275,9 @@ ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} hppalinux "$(tdir_hppalinux)" +ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)" ei386aout.c: $(srcdir)/emulparams/i386aout.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} i386aout "$(tdir_i386aout)" diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt index fbab221..bb69012 100644 --- a/contrib/binutils/ld/configure.tgt +++ b/contrib/binutils/ld/configure.tgt @@ -144,7 +144,12 @@ i[3456]86-*-sysv[45]*) targ_emul=elf_i386 ;; i[3456]86-*-solaris2*) targ_emul=elf_i386 ;; i[3456]86-*-unixware) targ_emul=elf_i386 ;; i[3456]86-*-solaris*) targ_emul=elf_i386 ;; -i[3456]86-*-netbsd*) targ_emul=i386nbsd ;; +i[3456]86-*-netbsdelf*) targ_emul=elf_i386 + targ_extra_emuls=i386nbsd + ;; +i[3456]86-*-netbsd*) targ_emul=i386nbsd + targ_extra_emuls=elf_i386 + ;; i[3456]86-*-netware) targ_emul=i386nw ;; i[3456]86-*-elf*) targ_emul=elf_i386 ;; i[3456]86-*-freebsdaout* | i[3456]86-*-freebsd[12].* | i[3456]86-*-freebsd[12]) @@ -242,6 +247,7 @@ m68*-hp*-netbsd*) targ_emul=m68k4knbsd ;; m68*-*-netbsd*) targ_emul=m68knbsd ;; m68*-*-psos*) targ_emul=m68kpsos ;; m68*-*-rtems*) targ_emul=m68kcoff ;; +hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;; hppa*64*-*) targ_emul=elf64hppa ;; hppa*-*-linux-gnu*) targ_emul=hppalinux ;; hppa*-*-*elf*) targ_emul=hppaelf ;; diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em index c0d52b1..76aaa8a 100644 --- a/contrib/binutils/ld/emultempl/elf32.em +++ b/contrib/binutils/ld/emultempl/elf32.em @@ -142,7 +142,7 @@ gld${EMULATION_NAME}_vercheck (s) soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = basename (bfd_get_filename (s->the_bfd)); + soname = lbasename (bfd_get_filename (s->the_bfd)); for (l = global_vercheck_needed; l != NULL; l = l->next) { @@ -224,7 +224,7 @@ gld${EMULATION_NAME}_stat_needed (s) soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = basename (s->filename); + soname = lbasename (s->filename); if (strncmp (soname, global_needed->name, suffix - global_needed->name) == 0) @@ -329,7 +329,7 @@ cat >>e${EMULATION_NAME}.c <<EOF einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd); /* First strip off everything before the last '/'. */ - soname = basename (abfd->filename); + soname = lbasename (abfd->filename); if (trace_file_tries) info_msg (_("found %s at %s\n"), soname, name); diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c index f683abb..924e3ec 100644 --- a/contrib/binutils/ld/ldlang.c +++ b/contrib/binutils/ld/ldlang.c @@ -4766,10 +4766,13 @@ lang_leave_overlay (fill, memspec, phdrs, lma_memspec) const char *lma_memspec; { lang_memory_region_type *region; + lang_memory_region_type * default_region; lang_memory_region_type *lma_region; struct overlay_list *l; struct lang_nocrossref *nocrossref; + default_region = lang_memory_region_lookup ("*default*"); + if (memspec == NULL) region = NULL; else @@ -4789,8 +4792,15 @@ lang_leave_overlay (fill, memspec, phdrs, lma_memspec) if (fill != 0 && l->os->fill == 0) l->os->fill = fill; - if (region != NULL && l->os->region == NULL) + + /* Assign a region to the sections, if one has been specified. + Override the assignment of the default section, but not + other sections. */ + if (region != NULL && + (l->os->region == NULL || + l->os->region == default_region)) l->os->region = region; + /* We only set lma_region for the first overlay section, as subsequent overlay sections will have load_base set relative to the first section. Also, don't set lma_region if @@ -4800,6 +4810,7 @@ lang_leave_overlay (fill, memspec, phdrs, lma_memspec) if (lma_region != NULL && l->os->lma_region == NULL && l->next == NULL && l->os->load_base == NULL) l->os->lma_region = lma_region; + if (phdrs != NULL && l->os->phdrs == NULL) l->os->phdrs = phdrs; |