* Makefile.in,archures.c,elf.c,targets.c: Likewise.
done
fi
-m32r_files="ChangeLog config.bfd configure.in configure"
+m32r_files="ChangeLog Makefile.in archures.c config.bfd configure.in configure elf.c targets.c"
if ( echo $* | grep keep\-m32r > /dev/null ) ; then
for i in $m32r_files ; do
if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
start-sanitize-m32r
* config.bfd,configure.in,configure: Add m32r support.
+ * Makefile.in,archures.c,elf.c,targets.c: Likewise.
end-sanitize-m32r
* config.bfd: Keep target list alphabetically sorted.
cpu-i386.o \
cpu-i860.o \
cpu-i960.o \
+ $(start-sanitize-m32r) \
+ cpu-m32r.o \
+ $(end-sanitize-m32r) \
cpu-m68k.o \
cpu-m88k.o \
cpu-mips.o \
cpu-rs6000.o \
cpu-sh.o \
cpu-sparc.o \
+ $(start-sanitize-v850) \
+ cpu-v850.o \
+ $(end-sanitize-v850) \
cpu-vax.o \
cpu-we32k.o \
cpu-w65.o \
elf32-hppa.o \
elf32-i386.o \
elf32-i860.o \
+ $(start-sanitize-m32r) \
+ elf32-m32r.o \
+ $(end-sanitize-m32r) \
elf32-m68k.o \
elf32-m88k.o \
elf32-mips.o \
elf32-ppc.o \
+ elf32-sh.o \
elf32-sparc.o \
elf32.o \
elflink.o \
elf32-m88k.c \
elf32-mips.c \
elf32-ppc.c \
+ elf32-sh.c \
elf32-sparc.c \
elf32.c \
elflink.c \
$(INCDIR)/elf/d10v.h elf32-target.h
end-sanitize-d10v:
+start-sanitize-m32r:
+elf32-m32r.o: elf32-m32r.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/m32r.h elf32-target.h
+end-sanitize-m32r:
+
+start-sanitize-v850:
+cpu-v850.o: cpu-v850.c
+elf32-v850.o: elf32-v850.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ elf32-target.h
+end-sanitize-v850:
+
$(OFILES): stamp-picdir
stamp-picdir:
$(INCDIR)/aout/stab.def libaout.h $(INCDIR)/bfdlink.h
aout-ns32k.o: aout-ns32k.c $(INCDIR)/aout/aout64.h \
ns32k.h libaout.h $(INCDIR)/bfdlink.h
+aout-sparcle.o: aout-sparcle.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \
+ $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
aout0.o: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
elf32-ppc.o: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/elf/ppc.h elf32-target.h
+elf32-sh.o: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ elf32-target.h
elf32-sparc.o: elf32-sparc.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/elf/sparc.h elf32-target.h
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
aout-target.h
som.o: som.c
-i386aout.o: i386aout.c libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+i386aout.o: i386aout.c $(INCDIR)/aout/aout64.h libaout.h \
+ $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
i386bsd.o: i386bsd.c libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
elf64-gen.o: elf64-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf64-target.h
-elf64-mips.o: elf64-mips.c $(INCDIR)/bfdlink.h genlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+elf64-mips.o: elf64-mips.c $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h \
+ genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/coff/sym.h \
$(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \
|| strncmp (name, ".stab", sizeof ".stab" - 1) == 0)
flags |= SEC_DEBUGGING;
+ /* As a GNU extension, if the name begins with .gnu.linkonce, we
+ only link a single copy of the section. This is used to support
+ g++. g++ will emit each template expansion in its own section.
+ The symbols will be defined as weak, so that multiple definitions
+ are permitted. The GNU linker extension is to actually discard
+ all but one of the sections. */
+ if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
+ flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
+
if (! bfd_set_section_flags (abfd, newsect, flags))
return false;
segment. */
new_segment = true;
}
- else if ((abfd->flags & D_PAGED) == 0)
- {
- /* If the file is not demand paged, which means that we
- don't require the sections to be correctly aligned in the
- file, then there is no other reason for a new segment. */
- new_segment = false;
- }
else if (BFD_ALIGN (last_hdr->lma + last_hdr->_raw_size, maxpagesize)
< hdr->lma)
{
skip a page in the segment, then we need a new segment. */
new_segment = true;
}
+ else if ((abfd->flags & D_PAGED) == 0)
+ {
+ /* If the file is not demand paged, which means that we
+ don't require the sections to be correctly aligned in the
+ file, then there is no other reason for a new segment. */
+ new_segment = false;
+ }
else if ((last_hdr->flags & SEC_LOAD) == 0
&& (hdr->flags & SEC_LOAD) != 0)
{
case bfd_arch_alpha:
i_ehdrp->e_machine = EM_ALPHA;
break;
+ case bfd_arch_sh:
+ i_ehdrp->e_machine = EM_SH;
+ break;
/* start-sanitize-d10v */
case bfd_arch_d10v:
i_ehdrp->e_machine = EM_CYGNUS_D10V;
break;
/* end-sanitize-d10v */
+/* start-sanitize-v850 */
+ case bfd_arch_v850:
+ i_ehdrp->e_machine = EM_CYGNUS_V850;
+ break;
+/* end-sanitize-v850 */
/* start-sanitize-arc */
case bfd_arch_arc:
i_ehdrp->e_machine = EM_CYGNUS_ARC;
break;
/* end-sanitize-arc */
+/* start-sanitize-m32r */
+ case bfd_arch_m32r:
+ i_ehdrp->e_machine = EM_CYGNUS_M32R;
+ break;
+/* end-sanitize-m32r */
/* also note that EM_M32, AT&T WE32100 is unknown to bfd */
default:
i_ehdrp->e_machine = EM_NONE;