Add OpenRISC support

This commit is contained in:
Nick Clifton 2001-04-24 15:08:16 +00:00
parent db14485300
commit b3baf5d0a8
23 changed files with 7309 additions and 3530 deletions

View File

@ -1,3 +1,27 @@
2001-04-24 Johan Rydberg <jrydberg@opencores.org>
* cpu-openrisc.c: New file.
* elf32-openrisc.c: Likewise.
* Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
(ALL_MACHINES_CFILES): Add cpu-openrisc.c.
(BFD32_BACKENDS): Add elf32-openrisc.lo.
(BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
(cpu-openrisc.lo, elf32-openrisc.lo): New rules.
* Makefile.in: Regenerated.
* config.bfd: (openrisc-*-elf): New target.
* configure.in (bfd_elf32_openrisc_vec): New vector.
* configure: Regenerated.
* libbfd.h: Regenerated.
* bfd-in2.h: Regenerated.
* reloc.c: Add OpenRISC relocations.
* targets.c (bfd_elf32_openrisc_vec): Declare.
(bfd_target_vect): Add bfd_elf32_openrisc_vec.
* archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
(bfd_openrisc_arch): Declare.
(bfd_archures_list): Add bfd_openrisc_arch.
* elf.c (prep_headers): Add bfd_arch_openrisc.
2001-04-23 Bo Thorsen <bo@suse.de>
* elf64-x86-64.c: Add c++ vtable hack.

View File

@ -69,6 +69,7 @@ ALL_MACHINES = \
cpu-mcore.lo \
cpu-mips.lo \
cpu-ns32k.lo \
cpu-openrisc.lo \
cpu-pdp11.lo \
cpu-pj.lo \
cpu-powerpc.lo \
@ -113,6 +114,7 @@ ALL_MACHINES_CFILES = \
cpu-mcore.c \
cpu-mips.c \
cpu-ns32k.c \
cpu-openrisc.c \
cpu-pdp11.c \
cpu-pj.c \
cpu-powerpc.c \
@ -201,6 +203,7 @@ BFD32_BACKENDS = \
elf-m10300.lo \
elf32-mcore.lo \
elf32-mips.lo \
elf32-openrisc.lo \
elf32-pj.lo \
elf32-ppc.lo \
elf32-s390.lo \
@ -340,6 +343,7 @@ BFD32_BACKENDS_CFILES = \
elf-m10300.c \
elf32-mcore.c \
elf32-mips.c \
elf32-openrisc.c \
elf32-pj.c \
elf32-ppc.c \
elf32-s390.c \
@ -812,6 +816,7 @@ cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h
cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h
cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h
cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h
@ -1060,6 +1065,10 @@ elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \
elf32-target.h
elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h \

View File

@ -144,41 +144,461 @@ BFD_H = bfd.h
# for the debugger, so if you are downloading things as S-records you
# need two copies of the executable, one to download and one for the
# debugger).
BFD_LIBS = archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo
BFD_LIBS = \
archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo \
format.lo init.lo libbfd.lo opncls.lo reloc.lo \
section.lo syms.lo targets.lo hash.lo linker.lo \
srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
merge.lo dwarf2.lo
BFD_LIBS_CFILES = archive.c archures.c bfd.c cache.c coffgen.c corefile.c format.c init.c libbfd.c opncls.c reloc.c section.c syms.c targets.c hash.c linker.c srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c merge.c dwarf2.c
BFD_LIBS_CFILES = \
archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
format.c init.c libbfd.c opncls.c reloc.c \
section.c syms.c targets.c hash.c linker.c \
srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
merge.c dwarf2.c
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
ALL_MACHINES = cpu-a29k.lo cpu-alpha.lo cpu-arc.lo cpu-arm.lo cpu-avr.lo cpu-cris.lo cpu-d10v.lo cpu-d30v.lo cpu-fr30.lo cpu-h8300.lo cpu-h8500.lo cpu-hppa.lo cpu-ia64.lo cpu-i370.lo cpu-i386.lo cpu-i860.lo cpu-i960.lo cpu-m32r.lo cpu-m68hc11.lo cpu-m68hc12.lo cpu-m68k.lo cpu-m88k.lo cpu-m10200.lo cpu-m10300.lo cpu-mcore.lo cpu-mips.lo cpu-ns32k.lo cpu-pdp11.lo cpu-pj.lo cpu-powerpc.lo cpu-rs6000.lo cpu-s390.lo cpu-sh.lo cpu-sparc.lo cpu-tic30.lo cpu-tic54x.lo cpu-tic80.lo cpu-v850.lo cpu-vax.lo cpu-we32k.lo cpu-w65.lo cpu-z8k.lo
ALL_MACHINES = \
cpu-a29k.lo \
cpu-alpha.lo \
cpu-arc.lo \
cpu-arm.lo \
cpu-avr.lo \
cpu-cris.lo \
cpu-d10v.lo \
cpu-d30v.lo \
cpu-fr30.lo \
cpu-h8300.lo \
cpu-h8500.lo \
cpu-hppa.lo \
cpu-ia64.lo \
cpu-i370.lo \
cpu-i386.lo \
cpu-i860.lo \
cpu-i960.lo \
cpu-m32r.lo \
cpu-m68hc11.lo \
cpu-m68hc12.lo \
cpu-m68k.lo \
cpu-m88k.lo \
cpu-m10200.lo \
cpu-m10300.lo \
cpu-mcore.lo \
cpu-mips.lo \
cpu-ns32k.lo \
cpu-openrisc.lo \
cpu-pdp11.lo \
cpu-pj.lo \
cpu-powerpc.lo \
cpu-rs6000.lo \
cpu-s390.lo \
cpu-sh.lo \
cpu-sparc.lo \
cpu-tic30.lo \
cpu-tic54x.lo \
cpu-tic80.lo \
cpu-v850.lo \
cpu-vax.lo \
cpu-we32k.lo \
cpu-w65.lo \
cpu-z8k.lo
ALL_MACHINES_CFILES = cpu-a29k.c cpu-alpha.c cpu-arc.c cpu-arm.c cpu-avr.c cpu-cris.c cpu-d10v.c cpu-d30v.c cpu-fr30.c cpu-h8300.c cpu-h8500.c cpu-hppa.c cpu-ia64.c cpu-i370.c cpu-i386.c cpu-i860.c cpu-i960.c cpu-m32r.c cpu-m68hc11.c cpu-m68hc12.c cpu-m68k.c cpu-m88k.c cpu-m10200.c cpu-m10300.c cpu-mcore.c cpu-mips.c cpu-ns32k.c cpu-pdp11.c cpu-pj.c cpu-powerpc.c cpu-rs6000.c cpu-s390.c cpu-sh.c cpu-sparc.c cpu-tic30.c cpu-tic54x.c cpu-tic80.c cpu-v850.c cpu-vax.c cpu-we32k.c cpu-w65.c cpu-z8k.c
ALL_MACHINES_CFILES = \
cpu-a29k.c \
cpu-alpha.c \
cpu-arc.c \
cpu-arm.c \
cpu-avr.c \
cpu-cris.c \
cpu-d10v.c \
cpu-d30v.c \
cpu-fr30.c \
cpu-h8300.c \
cpu-h8500.c \
cpu-hppa.c \
cpu-ia64.c \
cpu-i370.c \
cpu-i386.c \
cpu-i860.c \
cpu-i960.c \
cpu-m32r.c \
cpu-m68hc11.c \
cpu-m68hc12.c \
cpu-m68k.c \
cpu-m88k.c \
cpu-m10200.c \
cpu-m10300.c \
cpu-mcore.c \
cpu-mips.c \
cpu-ns32k.c \
cpu-openrisc.c \
cpu-pdp11.c \
cpu-pj.c \
cpu-powerpc.c \
cpu-rs6000.c \
cpu-s390.c \
cpu-sh.c \
cpu-sparc.c \
cpu-tic30.c \
cpu-tic54x.c \
cpu-tic80.c \
cpu-v850.c \
cpu-vax.c \
cpu-we32k.c \
cpu-w65.c \
cpu-z8k.c
# The .o files needed by all of the 32 bit vectors that are configured into
# target_vector in targets.c if configured with --enable-targets=all.
BFD32_BACKENDS = aout-adobe.lo aout-arm.lo aout-cris.lo aout-ns32k.lo aout-sparcle.lo aout-tic30.lo aout0.lo aout32.lo armnetbsd.lo bout.lo cf-i386lynx.lo cf-m68klynx.lo cf-sparclynx.lo coff-a29k.lo coff-apollo.lo coff-arm.lo coff-aux.lo coff-h8300.lo coff-h8500.lo coff-i386.lo coff-go32.lo coff-i860.lo coff-i960.lo coff-m68k.lo coff-m88k.lo coff-mips.lo coff-pmac.lo coff-rs6000.lo coff-sh.lo coff-sparc.lo coff-stgo32.lo coff-svm68k.lo coff-tic30.lo coff-tic54x.lo coff-tic80.lo coff-u68k.lo coff-we32k.lo coff-w65.lo coff-z8k.lo cofflink.lo dwarf1.lo ecoff.lo ecofflink.lo efi-app-ia32.lo elf.lo elf32-arc.lo elfarm-oabi.lo elfarm-nabi.lo elf32-avr.lo elf32-cris.lo elf32-d10v.lo elf32-d30v.lo elf32-fr30.lo elf32-gen.lo elf32-hppa.lo elf32-i370.lo elf32-i386.lo elf32-i860.lo elf32-i960.lo elf32-ia64.lo elf32-m32r.lo elf32-m68hc11.lo elf32-m68hc12.lo elf32-m68k.lo elf32-m88k.lo elf-m10200.lo elf-m10300.lo elf32-mcore.lo elf32-mips.lo elf32-pj.lo elf32-ppc.lo elf32-s390.lo elf32-sh.lo elf32-sh-lin.lo elf32-sparc.lo elf32-v850.lo elf32.lo elflink.lo epoc-pe-arm.lo epoc-pei-arm.lo hp300bsd.lo hp300hpux.lo som.lo i386aout.lo i386bsd.lo i386dynix.lo i386freebsd.lo i386linux.lo i386lynx.lo i386msdos.lo i386netbsd.lo i386mach3.lo i386os9k.lo ieee.lo m68k4knetbsd.lo m68klinux.lo m68klynx.lo m68knetbsd.lo m88kmach3.lo mipsbsd.lo newsos3.lo nlm.lo nlm32-i386.lo nlm32-sparc.lo nlm32-ppc.lo nlm32.lo ns32knetbsd.lo oasys.lo pc532-mach.lo pdp11.lo pe-arm.lo pei-arm.lo pe-i386.lo pei-i386.lo pe-mcore.lo pei-mcore.lo pe-ppc.lo pei-ppc.lo pe-sh.lo pei-sh.lo pe-mips.lo pei-mips.lo peigen.lo ppcboot.lo reloc16.lo riscix.lo sparclinux.lo sparclynx.lo sparcnetbsd.lo sunos.lo vaxnetbsd.lo versados.lo vms.lo vms-gsd.lo vms-hdr.lo vms-misc.lo vms-tir.lo xcofflink.lo
BFD32_BACKENDS = \
aout-adobe.lo \
aout-arm.lo \
aout-cris.lo \
aout-ns32k.lo \
aout-sparcle.lo \
aout-tic30.lo \
aout0.lo \
aout32.lo \
armnetbsd.lo \
bout.lo \
cf-i386lynx.lo \
cf-m68klynx.lo \
cf-sparclynx.lo \
coff-a29k.lo \
coff-apollo.lo \
coff-arm.lo \
coff-aux.lo \
coff-h8300.lo \
coff-h8500.lo \
coff-i386.lo \
coff-go32.lo \
coff-i860.lo \
coff-i960.lo \
coff-m68k.lo \
coff-m88k.lo \
coff-mips.lo \
coff-pmac.lo \
coff-rs6000.lo \
coff-sh.lo \
coff-sparc.lo \
coff-stgo32.lo \
coff-svm68k.lo \
coff-tic30.lo \
coff-tic54x.lo \
coff-tic80.lo \
coff-u68k.lo \
coff-we32k.lo \
coff-w65.lo \
coff-z8k.lo \
cofflink.lo \
dwarf1.lo \
ecoff.lo \
ecofflink.lo \
efi-app-ia32.lo \
elf.lo \
elf32-arc.lo \
elfarm-oabi.lo \
elfarm-nabi.lo \
elf32-avr.lo \
elf32-cris.lo \
elf32-d10v.lo \
elf32-d30v.lo \
elf32-fr30.lo \
elf32-gen.lo \
elf32-hppa.lo \
elf32-i370.lo \
elf32-i386.lo \
elf32-i860.lo \
elf32-i960.lo \
elf32-ia64.lo \
elf32-m32r.lo \
elf32-m68hc11.lo \
elf32-m68hc12.lo \
elf32-m68k.lo \
elf32-m88k.lo \
elf-m10200.lo \
elf-m10300.lo \
elf32-mcore.lo \
elf32-mips.lo \
elf32-openrisc.lo \
elf32-pj.lo \
elf32-ppc.lo \
elf32-s390.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
elf32-sparc.lo \
elf32-v850.lo \
elf32.lo \
elflink.lo \
epoc-pe-arm.lo \
epoc-pei-arm.lo \
hp300bsd.lo \
hp300hpux.lo \
som.lo \
i386aout.lo \
i386bsd.lo \
i386dynix.lo \
i386freebsd.lo \
i386linux.lo \
i386lynx.lo \
i386msdos.lo \
i386netbsd.lo \
i386mach3.lo \
i386os9k.lo \
ieee.lo \
m68k4knetbsd.lo \
m68klinux.lo \
m68klynx.lo \
m68knetbsd.lo \
m88kmach3.lo \
mipsbsd.lo \
newsos3.lo \
nlm.lo \
nlm32-i386.lo \
nlm32-sparc.lo \
nlm32-ppc.lo \
nlm32.lo \
ns32knetbsd.lo \
oasys.lo \
pc532-mach.lo \
pdp11.lo \
pe-arm.lo \
pei-arm.lo \
pe-i386.lo \
pei-i386.lo \
pe-mcore.lo \
pei-mcore.lo \
pe-ppc.lo \
pei-ppc.lo \
pe-sh.lo \
pei-sh.lo \
pe-mips.lo \
pei-mips.lo \
peigen.lo \
ppcboot.lo \
reloc16.lo \
riscix.lo \
sparclinux.lo \
sparclynx.lo \
sparcnetbsd.lo \
sunos.lo \
vaxnetbsd.lo \
versados.lo \
vms.lo \
vms-gsd.lo \
vms-hdr.lo \
vms-misc.lo \
vms-tir.lo \
xcofflink.lo
BFD32_BACKENDS_CFILES = aout-adobe.c aout-arm.c aout-cris.c aout-ns32k.c aout-sparcle.c aout-tic30.c aout0.c aout32.c armnetbsd.c bout.c cf-i386lynx.c cf-m68klynx.c cf-sparclynx.c coff-a29k.c coff-apollo.c coff-arm.c coff-aux.c coff-h8300.c coff-h8500.c coff-i386.c coff-i860.c coff-go32.c coff-i960.c coff-m68k.c coff-m88k.c coff-mips.c coff-pmac.c coff-rs6000.c coff-sh.c coff-sparc.c coff-stgo32.c coff-svm68k.c coff-tic30.c coff-tic54x.c coff-tic80.c coff-u68k.c coff-we32k.c coff-w65.c coff-z8k.c cofflink.c dwarf1.c ecoff.c ecofflink.c efi-app-ia32.c elf.c elf32-arc.c elfarm-oabi.c elfarm-nabi.c elf32-avr.c elf32-cris.c elf32-d10v.c elf32-d30v.c elf32-fr30.c elf32-gen.c elf32-hppa.c elf32-i370.c elf32-i386.c elf32-i860.c elf32-i960.c elf32-m32r.c elf32-m68k.c elf32-m68hc11.c elf32-m68hc12.c elf32-m88k.c elf-m10200.c elf-m10300.c elf32-mcore.c elf32-mips.c elf32-pj.c elf32-ppc.c elf32-s390.c elf32-sh.c elf32-sh-lin.c elf32-sparc.c elf32-v850.c elf32.c elflink.c epoc-pe-arm.c epoc-pei-arm.c hp300bsd.c hp300hpux.c som.c i386aout.c i386bsd.c i386dynix.c i386freebsd.c i386linux.c i386lynx.c i386msdos.c i386netbsd.c i386mach3.c i386os9k.c ieee.c m68k4knetbsd.c m68klinux.c m68klynx.c m68knetbsd.c m88kmach3.c mipsbsd.c newsos3.c nlm.c nlm32-i386.c nlm32-sparc.c nlm32-ppc.c nlm32.c ns32knetbsd.c oasys.c pc532-mach.c pdp11.c pe-arm.c pei-arm.c pe-i386.c pei-i386.c pe-mcore.c pei-mcore.c pe-ppc.c pei-ppc.c pe-sh.c pei-sh.c pe-mips.c pei-mips.c ppcboot.c reloc16.c riscix.c sparclinux.c sparclynx.c sparcnetbsd.c sunos.c vaxnetbsd.c versados.c vms.c vms-gsd.c vms-hdr.c vms-misc.c vms-tir.c xcofflink.c
BFD32_BACKENDS_CFILES = \
aout-adobe.c \
aout-arm.c \
aout-cris.c \
aout-ns32k.c \
aout-sparcle.c \
aout-tic30.c \
aout0.c \
aout32.c \
armnetbsd.c \
bout.c \
cf-i386lynx.c \
cf-m68klynx.c \
cf-sparclynx.c \
coff-a29k.c \
coff-apollo.c \
coff-arm.c \
coff-aux.c \
coff-h8300.c \
coff-h8500.c \
coff-i386.c \
coff-i860.c \
coff-go32.c \
coff-i960.c \
coff-m68k.c \
coff-m88k.c \
coff-mips.c \
coff-pmac.c \
coff-rs6000.c \
coff-sh.c \
coff-sparc.c \
coff-stgo32.c \
coff-svm68k.c \
coff-tic30.c \
coff-tic54x.c \
coff-tic80.c \
coff-u68k.c \
coff-we32k.c \
coff-w65.c \
coff-z8k.c \
cofflink.c \
dwarf1.c \
ecoff.c \
ecofflink.c \
efi-app-ia32.c \
elf.c \
elf32-arc.c \
elfarm-oabi.c \
elfarm-nabi.c \
elf32-avr.c \
elf32-cris.c \
elf32-d10v.c \
elf32-d30v.c \
elf32-fr30.c \
elf32-gen.c \
elf32-hppa.c \
elf32-i370.c \
elf32-i386.c \
elf32-i860.c \
elf32-i960.c \
elf32-m32r.c \
elf32-m68k.c \
elf32-m68hc11.c \
elf32-m68hc12.c \
elf32-m88k.c \
elf-m10200.c \
elf-m10300.c \
elf32-mcore.c \
elf32-mips.c \
elf32-openrisc.c \
elf32-pj.c \
elf32-ppc.c \
elf32-s390.c \
elf32-sh.c \
elf32-sh-lin.c \
elf32-sparc.c \
elf32-v850.c \
elf32.c \
elflink.c \
epoc-pe-arm.c \
epoc-pei-arm.c \
hp300bsd.c \
hp300hpux.c \
som.c \
i386aout.c \
i386bsd.c \
i386dynix.c \
i386freebsd.c \
i386linux.c \
i386lynx.c \
i386msdos.c \
i386netbsd.c \
i386mach3.c \
i386os9k.c \
ieee.c \
m68k4knetbsd.c \
m68klinux.c \
m68klynx.c \
m68knetbsd.c \
m88kmach3.c \
mipsbsd.c \
newsos3.c \
nlm.c \
nlm32-i386.c \
nlm32-sparc.c \
nlm32-ppc.c \
nlm32.c \
ns32knetbsd.c \
oasys.c \
pc532-mach.c \
pdp11.c \
pe-arm.c \
pei-arm.c \
pe-i386.c \
pei-i386.c \
pe-mcore.c \
pei-mcore.c \
pe-ppc.c \
pei-ppc.c \
pe-sh.c \
pei-sh.c \
pe-mips.c \
pei-mips.c \
ppcboot.c \
reloc16.c \
riscix.c \
sparclinux.c \
sparclynx.c \
sparcnetbsd.c \
sunos.c \
vaxnetbsd.c \
versados.c \
vms.c \
vms-gsd.c \
vms-hdr.c \
vms-misc.c \
vms-tir.c \
xcofflink.c
# The .o files needed by all of the 64 bit vectors that are configured into
# target_vector in targets.c if configured with --enable-targets=all
# and --enable-64-bit-bfd.
BFD64_BACKENDS = aout64.lo coff-alpha.lo coff64-rs6000.lo demo64.lo efi-app-ia64.lo elf64-x86-64.lo elf64-alpha.lo elf64-hppa.lo elf64-ia64.lo elf64-gen.lo elf64-mips.lo elf64-s390.lo elf64-sparc.lo elf64.lo nlm32-alpha.lo nlm64.lo pepigen.lo
BFD64_BACKENDS = \
aout64.lo \
coff-alpha.lo \
coff64-rs6000.lo \
demo64.lo \
efi-app-ia64.lo \
elf64-x86-64.lo \
elf64-alpha.lo \
elf64-hppa.lo \
elf64-ia64.lo \
elf64-gen.lo \
elf64-mips.lo \
elf64-s390.lo \
elf64-sparc.lo \
elf64.lo \
nlm32-alpha.lo \
nlm64.lo \
pepigen.lo
BFD64_BACKENDS_CFILES = aout64.c coff-alpha.c coff64-rs6000.c demo64.c efi-app-ia64.c elf64-x86-64.c elf64-alpha.c elf64-hppa.c elf64-gen.c elf64-mips.c elf64-s390.c elf64-sparc.c elf64.c nlm32-alpha.c nlm64.c
BFD64_BACKENDS_CFILES = \
aout64.c \
coff-alpha.c \
coff64-rs6000.c \
demo64.c \
efi-app-ia64.c \
elf64-x86-64.c \
elf64-alpha.c \
elf64-hppa.c \
elf64-gen.c \
elf64-mips.c \
elf64-s390.c \
elf64-sparc.c \
elf64.c \
nlm32-alpha.c \
nlm64.c
OPTIONAL_BACKENDS = aix386-core.lo hpux-core.lo irix-core.lo lynx-core.lo osf-core.lo sco5-core.lo trad-core.lo cisco-core.lo
OPTIONAL_BACKENDS = \
aix386-core.lo \
hpux-core.lo \
irix-core.lo \
lynx-core.lo \
osf-core.lo \
sco5-core.lo \
trad-core.lo \
cisco-core.lo
OPTIONAL_BACKENDS_CFILES = aix386-core.c hpux-core.c irix-core.c lynx-core.c osf-core.c sco5-core.c trad-core.c cisco-core.c
OPTIONAL_BACKENDS_CFILES = \
aix386-core.c \
hpux-core.c \
irix-core.c \
lynx-core.c \
osf-core.c \
sco5-core.c \
trad-core.c \
cisco-core.c
# These are defined by configure.in:
@ -191,18 +611,31 @@ TDEFAULTS = @tdefaults@
INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
# C source files that correspond to .o's.
SOURCE_CFILES = $(BFD_LIBS_CFILES) $(ALL_MACHINES_CFILES) $(BFD32_BACKENDS_CFILES) $(BFD64_BACKENDS_CFILES) $(OPTIONAL_BACKENDS_CFILES)
SOURCE_CFILES = \
$(BFD_LIBS_CFILES) \
$(ALL_MACHINES_CFILES) \
$(BFD32_BACKENDS_CFILES) \
$(BFD64_BACKENDS_CFILES) \
$(OPTIONAL_BACKENDS_CFILES)
BUILD_CFILES = elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
BUILD_CFILES = \
elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
SOURCE_HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h \
elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h
BUILD_HFILES = elf32-target.h elf64-target.h targmatch.h
BUILD_HFILES = \
elf32-target.h elf64-target.h targmatch.h
HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
@ -232,14 +665,16 @@ libbfd_a_SOURCES =
BFD_H_DEPS = $(INCDIR)/ansidecl.h
LOCAL_H_DEPS = libbfd.h sysdep.h config.h
BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c
BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c
LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c cache.c reloc.c archures.c elf.c
LIBCOFF_H_FILES = libcoff-in.h coffcode.h
MOSTLYCLEANFILES = ofiles stamp-ofiles
CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
@ -535,7 +970,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -919,6 +1354,7 @@ cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h
cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h
cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h
cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h
@ -1167,6 +1603,10 @@ elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \
elf32-target.h
elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h \

21
bfd/aclocal.m4 vendored
View File

@ -1,7 +1,6 @@
dnl aclocal.m4 generated automatically by aclocal 1.4
dnl Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
dnl Free Software Foundation, Inc.
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@ -137,24 +136,6 @@ AC_DEFUN([CY_WITH_NLS],)
AC_SUBST(INTLLIBS)
])
#serial 1
# This test replaces the one in autoconf.
# Currently this macro should have the same name as the autoconf macro
# because gettext's gettext.m4 (distributed in the automake package)
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
# give these diagnostics:
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
undefine([AC_ISC_POSIX])
AC_DEFUN(AC_ISC_POSIX,
[
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
]
)
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.

View File

@ -257,6 +257,7 @@ DESCRIPTION
. bfd_arch_s390, {* IBM s390 *}
.#define bfd_mach_s390_esa 0
.#define bfd_mach_s390_esame 1
. bfd_arch_openrisc, {* OpenRISC *}
. bfd_arch_last
. };
*/
@ -334,6 +335,7 @@ extern const bfd_arch_info_type bfd_mcore_arch;
extern const bfd_arch_info_type bfd_avr_arch;
extern const bfd_arch_info_type bfd_ia64_arch;
extern const bfd_arch_info_type bfd_s390_arch;
extern const bfd_arch_info_type bfd_openrisc_arch;
static const bfd_arch_info_type * const bfd_archures_list[] = {
#ifdef SELECT_ARCHITECTURES
@ -380,6 +382,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = {
&bfd_avr_arch,
&bfd_ia64_arch,
&bfd_s390_arch,
&bfd_openrisc_arch,
#endif
0
};

View File

@ -1539,6 +1539,7 @@ enum bfd_architecture
bfd_arch_s390, /* IBM s390 */
#define bfd_mach_s390_esa 0
#define bfd_mach_s390_esame 1
bfd_arch_openrisc, /* OpenRISC */
bfd_arch_last
};
@ -2758,6 +2759,10 @@ This is the 3 bits of a value. */
BFD_RELOC_860_HIGH,
BFD_RELOC_860_HIGOT,
BFD_RELOC_860_HIGOTOFF,
/* OpenRISC Relocations. */
BFD_RELOC_OPENRISC_ABS_26,
BFD_RELOC_OPENRISC_REL_26,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *

View File

@ -696,6 +696,10 @@ case "${targ}" in
targ_underscore=yes
;;
openrisc-*-elf)
targ_defvec=bfd_elf32_openrisc_vec
;;
pdp11-*-*)
targ_defvec=pdp11_aout_vec
targ_underscore=yes

View File

@ -25,6 +25,9 @@
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t

9337
bfd/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -540,6 +540,7 @@ do
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;

42
bfd/cpu-openrisc.c Normal file
View File

@ -0,0 +1,42 @@
/* BFD support for the OpenRISC architecture.
Copyright (C) 2001 Free Software Foundation, Inc.
Contributed by Johan Rydberg, jrydberg@opencores.org
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \
{ \
BITS_WORD, /* bits in a word */ \
BITS_ADDR, /* bits in an address */ \
8, /* 8 bits in a byte */ \
bfd_arch_openrisc, \
NUMBER, \
"openrisc", \
PRINT, \
2, \
DEFAULT, \
bfd_default_compatible, \
bfd_default_scan, \
NEXT, \
}
const bfd_arch_info_type bfd_openrisc_arch =
N (32, 32, 0, "openrisc", true, 0);

View File

@ -1,7 +1,6 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -195,7 +194,7 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:

View File

@ -3413,7 +3413,10 @@ prep_headers (abfd)
case bfd_arch_cris:
i_ehdrp->e_machine = EM_CRIS;
break;
/* also note that EM_M32, AT&T WE32100 is unknown to bfd */
case bfd_arch_openrisc:
i_ehdrp->e_machine = EM_OPENRISC;
break;
/* Also note that EM_M32, AT&T WE32100 is unknown to bfd. */
default:
i_ehdrp->e_machine = EM_NONE;
}

View File

@ -209,8 +209,10 @@ static int sort_dynamic_relocs
extern const bfd_target bfd_elf32_tradbigmips_vec;
extern const bfd_target bfd_elf32_tradlittlemips_vec;
#ifdef BFD64
extern const bfd_target bfd_elf64_tradbigmips_vec;
extern const bfd_target bfd_elf64_tradlittlemips_vec;
#endif
/* The level of IRIX compatibility we're striving for. */
@ -234,14 +236,19 @@ static bfd *reldyn_sorting_bfd;
/* Depending on the target vector we generate some version of Irix
executables or "normal" MIPS ELF ABI executables. */
#ifdef BFD64
#define IRIX_COMPAT(abfd) \
(((abfd->xvec == &bfd_elf64_tradbigmips_vec) || \
(abfd->xvec == &bfd_elf64_tradlittlemips_vec) || \
(abfd->xvec == &bfd_elf32_tradbigmips_vec) || \
(abfd->xvec == &bfd_elf32_tradlittlemips_vec)) ? ict_none : \
((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5))
#else
#define IRIX_COMPAT(abfd) \
(((abfd->xvec == &bfd_elf32_tradbigmips_vec) || \
(abfd->xvec == &bfd_elf32_tradlittlemips_vec)) ? ict_none : \
((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5))
#endif
/* Whether we are trying to be compatible with IRIX at all. */
#define SGI_COMPAT(abfd) \

653
bfd/elf32-openrisc.c Normal file
View File

@ -0,0 +1,653 @@
/* OpenRISC-specific support for 32-bit ELF.
Copyright (C) 2001 Free Software Foundation, Inc.
Contributed by Johan Rydberg, jrydberg@opencores.org
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf/openrisc.h"
#include "libiberty.h"
/* Forward declarations. */
static reloc_howto_type *openrisc_reloc_type_lookup
PARAMS ((bfd * , bfd_reloc_code_real_type));
static void openrisc_info_to_howto_rela
PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
static boolean openrisc_elf_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
static bfd_reloc_status_type openrisc_final_link_relocate
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, bfd_vma));
static boolean openrisc_elf_gc_sweep_hook
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
static asection *openrisc_elf_gc_mark_hook
PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
struct elf_link_hash_entry *, Elf_Internal_Sym *));
static reloc_howto_type openrisc_elf_howto_table[] =
{
/* This reloc does nothing. */
HOWTO (R_OPENRISC_NONE, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_OPENRISC_NONE", /* name */
false, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
/* A PC relative 26 bit relocation, right shifted by 2. */
HOWTO (R_OPENRISC_INSN_REL_26, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
26, /* bitsize */
true, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_OPENRISC_INSN_REL_26", /* name */
false, /* partial_inplace */
0x00000000, /* src_mask */
0x03ffffff, /* dst_mask */
false), /* pcrel_offset */
/* A absolute 26 bit relocation, right shifted by 2. */
HOWTO (R_OPENRISC_INSN_ABS_26, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
26, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_OPENRISC_INSN_ABS_26", /* name */
false, /* partial_inplace */
0x00000000, /* src_mask */
0x03ffffff, /* dst_mask */
false), /* pcrel_offset */
HOWTO (R_OPENRISC_LO_16_IN_INSN, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_OPENRISC_LO_16_IN_INSN", /* name */
false, /* partial_inplace */
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
false), /* pcrel_offset */
HOWTO (R_OPENRISC_HI_16_IN_INSN, /* type */
16, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_OPENRISC_HI_16_IN_INSN", /* name */
false, /* partial_inplace */
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
false), /* pcrel_offset */
/* An 8 bit absolute relocation. */
HOWTO (R_OPENRISC_8, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_OPENRISC_8", /* name */
true, /* partial_inplace */
0x0000, /* src_mask */
0x00ff, /* dst_mask */
false), /* pcrel_offset */
/* A 16 bit absolute relocation. */
HOWTO (R_OPENRISC_16, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_OPENRISC_16", /* name */
true, /* partial_inplace */
0x00000000, /* src_mask */
0x0000ffff, /* dst_mask */
false), /* pcrel_offset */
/* A 32 bit absolute relocation. */
HOWTO (R_OPENRISC_32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_OPENRISC_32", /* name */
true, /* partial_inplace */
0x00000000, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* GNU extension to record C++ vtable hierarchy */
HOWTO (R_OPENRISC_GNU_VTINHERIT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
NULL, /* special_function */
"R_OPENRISC_GNU_VTINHERIT", /* name */
false, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
/* GNU extension to record C++ vtable member usage */
HOWTO (R_OPENRISC_GNU_VTENTRY, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
_bfd_elf_rel_vtable_reloc_fn, /* special_function */
"R_OPENRISC_GNU_VTENTRY", /* name */
false, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
};
/* Map BFD reloc types to OpenRISC ELF reloc types. */
struct openrisc_reloc_map
{
bfd_reloc_code_real_type bfd_reloc_val;
unsigned int openrisc_reloc_val;
};
static const struct openrisc_reloc_map openrisc_reloc_map[] =
{
{ BFD_RELOC_NONE, R_OPENRISC_NONE },
{ BFD_RELOC_32, R_OPENRISC_32 },
{ BFD_RELOC_16, R_OPENRISC_16 },
{ BFD_RELOC_8, R_OPENRISC_8 },
{ BFD_RELOC_OPENRISC_REL_26,R_OPENRISC_INSN_REL_26 },
{ BFD_RELOC_OPENRISC_ABS_26,R_OPENRISC_INSN_ABS_26 },
{ BFD_RELOC_HI16, R_OPENRISC_HI_16_IN_INSN },
{ BFD_RELOC_LO16, R_OPENRISC_LO_16_IN_INSN },
{ BFD_RELOC_VTABLE_INHERIT, R_OPENRISC_GNU_VTINHERIT },
{ BFD_RELOC_VTABLE_ENTRY, R_OPENRISC_GNU_VTENTRY }
};
static reloc_howto_type *
openrisc_reloc_type_lookup (abfd, code)
bfd * abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
unsigned int i;
for (i = ARRAY_SIZE (openrisc_reloc_map); --i;)
if (openrisc_reloc_map[i].bfd_reloc_val == code)
return & openrisc_elf_howto_table[openrisc_reloc_map[i].
openrisc_reloc_val];
return NULL;
}
/* Set the howto pointer for an OpenRISC ELF reloc. */
static void
openrisc_info_to_howto_rela (abfd, cache_ptr, dst)
bfd * abfd ATTRIBUTE_UNUSED;
arelent * cache_ptr;
Elf32_Internal_Rela * dst;
{
unsigned int r_type;
r_type = ELF32_R_TYPE (dst->r_info);
BFD_ASSERT (r_type < (unsigned int) R_OPENRISC_max);
cache_ptr->howto = & openrisc_elf_howto_table[r_type];
}
/* Perform a single relocation. By default we use the standard BFD
routines, but a few relocs, we have to do them ourselves. */
static bfd_reloc_status_type
openrisc_final_link_relocate (howto, input_bfd, input_section, contents, rel,
relocation)
reloc_howto_type *howto;
bfd *input_bfd;
asection *input_section;
bfd_byte *contents;
Elf_Internal_Rela *rel;
bfd_vma relocation;
{
bfd_reloc_status_type r = bfd_reloc_ok;
switch (howto->type)
{
case R_OPENRISC_LO_16_IN_INSN:
relocation &= 0xffff;
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
contents, rel->r_offset,
relocation, rel->r_addend);
break;
default:
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
contents, rel->r_offset,
relocation, rel->r_addend);
}
return r;
}
/* Relocate an OpenRISC ELF section.
There is some attempt to make this function usable for many architectures,
both USE_REL and USE_RELA ['twould be nice if such a critter existed],
if only to serve as a learning tool.
The RELOCATE_SECTION function is called by the new ELF backend linker
to handle the relocations for a section.
The relocs are always passed as Rela structures; if the section
actually uses Rel structures, the r_addend field will always be
zero.
This function is responsible for adjusting the section contents as
necessary, and (if using Rela relocs and generating a relocateable
output file) adjusting the reloc addend as necessary.
This function does not have to worry about setting the reloc
address or the reloc symbol index.
LOCAL_SYMS is a pointer to the swapped in local symbols.
LOCAL_SECTIONS is an array giving the section in the input file
corresponding to the st_shndx field of each local symbol.
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
When generating relocateable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
accordingly. */
static boolean
openrisc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
contents, relocs, local_syms, local_sections)
bfd *output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
bfd *input_bfd;
asection *input_section;
bfd_byte *contents;
Elf_Internal_Rela *relocs;
Elf_Internal_Sym *local_syms;
asection **local_sections;
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
relend = relocs + input_section->reloc_count;
for (rel = relocs; rel < relend; rel++)
{
reloc_howto_type *howto;
unsigned long r_symndx;
Elf_Internal_Sym *sym;
asection *sec;
struct elf_link_hash_entry *h;
bfd_vma relocation;
bfd_reloc_status_type r;
const char *name = NULL;
int r_type;
r_type = ELF32_R_TYPE (rel->r_info);
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_type == R_OPENRISC_GNU_VTINHERIT
|| r_type == R_OPENRISC_GNU_VTENTRY)
continue;
if (info->relocateable)
{
/* This is a relocateable link. We don't have to change
anything, unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
{
sec = local_sections[r_symndx];
rel->r_addend += sec->output_offset + sym->st_value;
}
}
continue;
}
if ((unsigned int) r_type >
(sizeof openrisc_elf_howto_table / sizeof (reloc_howto_type)))
abort ();
/* This is a final link. */
howto = openrisc_elf_howto_table + ELF32_R_TYPE (rel->r_info);
h = NULL;
sym = NULL;
sec = NULL;
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
relocation = (sec->output_section->vma
+ sec->output_offset + sym->st_value);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
}
else
{
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
name = h->root.root.string;
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
sec = h->root.u.def.section;
relocation = (h->root.u.def.value
+ sec->output_section->vma + sec->output_offset);
}
else if (h->root.type == bfd_link_hash_undefweak)
{
relocation = 0;
}
else
{
if (!((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset, true)))
return false;
relocation = 0;
}
}
r = openrisc_final_link_relocate (howto, input_bfd, input_section,
contents, rel, relocation);
if (r != bfd_reloc_ok)
{
const char *msg = (const char *) NULL;
switch (r)
{
case bfd_reloc_overflow:
r = info->callbacks->reloc_overflow
(info, name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
r = info->callbacks->undefined_symbol
(info, name, input_bfd, input_section, rel->r_offset, true);
break;
case bfd_reloc_outofrange:
msg = _("internal error: out of range error");
break;
case bfd_reloc_notsupported:
msg = _("internal error: unsupported relocation error");
break;
case bfd_reloc_dangerous:
msg = _("internal error: dangerous relocation");
break;
default:
msg = _("internal error: unknown error");
break;
}
if (msg)
r = info->callbacks->warning
(info, msg, name, input_bfd, input_section, rel->r_offset);
if (!r)
return false;
}
}
return true;
}
/* Return the section that should be marked against GC for a given
relocation. */
static asection *
openrisc_elf_gc_mark_hook (abfd, info, rel, h, sym)
bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
Elf_Internal_Rela *rel ATTRIBUTE_UNUSED;
struct elf_link_hash_entry *h ATTRIBUTE_UNUSED;
Elf_Internal_Sym *sym ATTRIBUTE_UNUSED;
{
if (h != NULL)
{
switch (ELF32_R_TYPE (rel->r_info))
{
case R_OPENRISC_GNU_VTINHERIT:
case R_OPENRISC_GNU_VTENTRY:
break;
default:
switch (h->root.type)
{
case bfd_link_hash_defined:
case bfd_link_hash_defweak:
return h->root.u.def.section;
case bfd_link_hash_common:
return h->root.u.c.p->section;
default:
break;
}
}
}
else
{
if (!(elf_bad_symtab (abfd)
&& ELF_ST_BIND (sym->st_info) != STB_LOCAL)
&& !((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
&& sym->st_shndx != SHN_COMMON))
{
return bfd_section_from_elf_index (abfd, sym->st_shndx);
}
}
return NULL;
}
/* Update the got entry reference counts for the section being removed. */
static boolean
openrisc_elf_gc_sweep_hook (abfd, info, sec, relocs)
bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
asection *sec ATTRIBUTE_UNUSED;
const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
{
return true;
}
/* Look through the relocs for a section during the first phase.
Since we don't do .gots or .plts, we just need to consider the
virtual table relocs for gc. */
static boolean
openrisc_elf_check_relocs (abfd, info, sec, relocs)
bfd *abfd;
struct bfd_link_info *info;
asection *sec;
const Elf_Internal_Rela *relocs;
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
if (info->relocateable)
return true;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
sym_hashes_end =
sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
if (!elf_bad_symtab (abfd))
sym_hashes_end -= symtab_hdr->sh_info;
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
{
struct elf_link_hash_entry *h;
unsigned long r_symndx;
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
switch (ELF32_R_TYPE (rel->r_info))
{
/* This relocation describes the C++ object vtable hierarchy.
Reconstruct it for later use during GC. */
case R_OPENRISC_GNU_VTINHERIT:
if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
return false;
break;
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_OPENRISC_GNU_VTENTRY:
if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
return false;
break;
}
}
return true;
}
/* Set the right machine number. */
static boolean
openrisc_elf_object_p (abfd)
bfd *abfd;
{
switch (elf_elfheader (abfd)->e_flags & 0xf)
{
default:
(void) bfd_default_set_arch_mach (abfd, bfd_arch_openrisc, 0);
break;
}
return true;
}
/* Store the machine number in the flags field. */
static void
openrisc_elf_final_write_processing (abfd, linker)
bfd *abfd;
boolean linker ATTRIBUTE_UNUSED;
{
unsigned long val;
switch (bfd_get_mach (abfd))
{
default:
val = 0;
break;
}
elf_elfheader (abfd)->e_flags &= ~0xf;
elf_elfheader (abfd)->e_flags |= val;
}
#define ELF_ARCH bfd_arch_openrisc
#define ELF_MACHINE_CODE EM_OPENRISC
#define ELF_MAXPAGESIZE 0x1000
#define TARGET_BIG_SYM bfd_elf32_openrisc_vec
#define TARGET_BIG_NAME "elf32-openrisc"
#define elf_info_to_howto_rel NULL
#define elf_info_to_howto openrisc_info_to_howto_rela
#define elf_backend_relocate_section openrisc_elf_relocate_section
#define elf_backend_gc_mark_hook openrisc_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook openrisc_elf_gc_sweep_hook
#define elf_backend_check_relocs openrisc_elf_check_relocs
#define elf_backend_can_gc_sections 1
#define bfd_elf32_bfd_reloc_type_lookup openrisc_reloc_type_lookup
#define elf_backend_object_p openrisc_elf_object_p
#define elf_backend_final_write_processing openrisc_elf_final_write_processing
#include "elf32-target.h"

View File

@ -1062,6 +1062,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_860_HIGH",
"BFD_RELOC_860_HIGOT",
"BFD_RELOC_860_HIGOTOFF",
"BFD_RELOC_OPENRISC_ABS_26",
"BFD_RELOC_OPENRISC_REL_26",
"@@overflow: BFD_RELOC_UNUSED@@",
};
#endif

View File

@ -82,6 +82,7 @@ cpu-m88k.c
cpu-mcore.c
cpu-mips.c
cpu-ns32k.c
cpu-openrisc.c
cpu-pdp11.c
cpu-pj.c
cpu-powerpc.c
@ -127,6 +128,7 @@ elf32-m68k.c
elf32-m88k.c
elf32-mcore.c
elf32-mips.c
elf32-openrisc.c
elf32-pj.c
elf32-ppc.c
elf32-s390.c
@ -195,6 +197,7 @@ m68klinux.c
m68klynx.c
m68knetbsd.c
m88kmach3.c
merge.c
mipsbsd.c
netbsd.h
newsos3.c

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2001-03-22 19:27-0800\n"
"POT-Creation-Date: 2001-04-24 16:35+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -404,7 +404,7 @@ msgstr ""
msgid "unsupported reloc type"
msgstr ""
#: coff-mips.c:875 elf32-mips.c:1423
#: coff-mips.c:875 elf32-mips.c:1435
msgid "GP relative relocation when _gp not defined"
msgstr ""
@ -556,21 +556,21 @@ msgstr ""
#: elf-hppa.h:1369 elf-hppa.h:1402 elf32-arm.h:1865 elf32-i386.c:1442
#: elf32-ppc.c:3093 elf32-s390.c:1442 elf32-sh.c:2997 elf64-s390.c:1431
#: elf64-x86-64.c:1234
#: elf64-x86-64.c:1290
#, c-format
msgid ""
"%s: warning: unresolvable relocation against symbol `%s' from %s section"
msgstr ""
#: elf-m10200.c:451 elf-m10300.c:663 elf32-arm.h:1939 elf32-avr.c:842
#: elf32-cris.c:1320 elf32-d10v.c:478 elf32-fr30.c:648 elf32-i860.c:1049
#: elf32-m32r.c:1266 elf32-v850.c:1681
#: elf32-cris.c:1335 elf32-d10v.c:478 elf32-fr30.c:648 elf32-i860.c:1049
#: elf32-m32r.c:1266 elf32-openrisc.c:448 elf32-v850.c:1681
msgid "internal error: out of range error"
msgstr ""
#: elf-m10200.c:455 elf-m10300.c:667 elf32-arm.h:1943 elf32-avr.c:846
#: elf32-cris.c:1324 elf32-d10v.c:482 elf32-fr30.c:652 elf32-i860.c:1053
#: elf32-m32r.c:1270 elf32-mips.c:7029 elf32-v850.c:1685
#: elf32-cris.c:1339 elf32-d10v.c:482 elf32-fr30.c:652 elf32-i860.c:1053
#: elf32-m32r.c:1270 elf32-mips.c:7046 elf32-openrisc.c:452 elf32-v850.c:1685
msgid "internal error: unsupported relocation error"
msgstr ""
@ -580,8 +580,8 @@ msgid "internal error: dangerous error"
msgstr ""
#: elf-m10200.c:463 elf-m10300.c:675 elf32-arm.h:1951 elf32-avr.c:854
#: elf32-cris.c:1332 elf32-d10v.c:490 elf32-fr30.c:660 elf32-i860.c:1061
#: elf32-m32r.c:1278 elf32-v850.c:1705
#: elf32-cris.c:1347 elf32-d10v.c:490 elf32-fr30.c:660 elf32-i860.c:1061
#: elf32-m32r.c:1278 elf32-openrisc.c:460 elf32-v850.c:1705
msgid "internal error: unknown error"
msgstr ""
@ -666,7 +666,7 @@ msgstr ""
#. Ignore init flag - it may not be set, despite the flags field
#. containing valid data.
#: elf32-arm.h:2205 elf32-cris.c:2895 elf32-m68k.c:430 elf32-mips.c:2701
#: elf32-arm.h:2205 elf32-cris.c:2968 elf32-m68k.c:430 elf32-mips.c:2718
#, c-format
msgid "private flags = %lx:"
msgstr ""
@ -735,83 +735,93 @@ msgstr ""
msgid "<Unrecognised flag bits set>"
msgstr ""
#: elf32-avr.c:850 elf32-cris.c:1328 elf32-fr30.c:656 elf32-i860.c:1057
#: elf32-v850.c:1689
#: elf32-avr.c:850 elf32-cris.c:1343 elf32-fr30.c:656 elf32-i860.c:1057
#: elf32-openrisc.c:456 elf32-v850.c:1689
msgid "internal error: dangerous relocation"
msgstr ""
#: elf32-cris.c:872
#: elf32-cris.c:874
#, c-format
msgid "%s(%s): unresolvable relocation %s against symbol `%s' from %s section"
msgstr ""
#: elf32-cris.c:880
#: elf32-cris.c:882
#, c-format
msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
msgstr ""
#: elf32-cris.c:943
#: elf32-cris.c:945
#, c-format
msgid ""
"%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
msgstr ""
#: elf32-cris.c:946 elf32-cris.c:1060
#: elf32-cris.c:948 elf32-cris.c:1075
msgid "[whose name is lost]"
msgstr ""
#: elf32-cris.c:1049
#: elf32-cris.c:1064
#, c-format
msgid ""
"%s: relocation %s with non-zero addend %d against local symbol from %s "
"section"
msgstr ""
#: elf32-cris.c:1056
#: elf32-cris.c:1071
#, c-format
msgid ""
"%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
msgstr ""
#: elf32-cris.c:1074
#: elf32-cris.c:1089
#, c-format
msgid ""
"%s: relocation %s is not allowed for global symbol: `%s' from %s section"
msgstr ""
#: elf32-cris.c:1192
#: elf32-cris.c:1207
#, c-format
msgid "%s: Internal inconsistency; no relocation section %s"
msgstr ""
#: elf32-cris.c:2452
#: elf32-cris.c:2469
#, c-format
msgid ""
"%s(%s), section %s:\n"
" relocation %s should not be used in a shared object; recompile with -fPIC"
msgstr ""
#: elf32-cris.c:2459
#: elf32-cris.c:2476
#, c-format
msgid ""
"%s, section %s:\n"
" relocation %s should not be used in a shared object; recompile with -fPIC"
msgstr ""
#: elf32-cris.c:2898
#: elf32-cris.c:2971
msgid " [symbols have a _ prefix]"
msgstr ""
#: elf32-cris.c:2937
#: elf32-cris.c:3010
#, c-format
msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
msgstr ""
#: elf32-cris.c:2938
#: elf32-cris.c:3011
#, c-format
msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
msgstr ""
#: elf32-gen.c:76 elf64-gen.c:76
#, c-format
msgid "%s(%s): Relocations in generic ELF (EM: %d)"
msgstr ""
#: elf32-gen.c:81 elf64-gen.c:81
#, c-format
msgid "%s: Relocations in generic ELF (EM: %d)"
msgstr ""
#: elf32-hppa.c:630
#, c-format
msgid "%s(%s+0x%lx): cannot find stub entry %s"
@ -931,141 +941,141 @@ msgstr ""
msgid "%s: Unknown relocation type %d\n"
msgstr ""
#: elf32-mips.c:1582
#: elf32-mips.c:1594
msgid "32bits gp relative relocation occurs for an external symbol"
msgstr ""
#: elf32-mips.c:1731
#: elf32-mips.c:1743
#, c-format
msgid "Linking mips16 objects into %s format is not supported"
msgstr ""
#: elf32-mips.c:2588
#: elf32-mips.c:2605
#, c-format
msgid "%s: linking PIC files with non-PIC files"
msgstr ""
#: elf32-mips.c:2598
#: elf32-mips.c:2615
#, c-format
msgid "%s: linking abicalls files with non-abicalls files"
msgstr ""
#: elf32-mips.c:2627
#: elf32-mips.c:2644
#, c-format
msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
msgstr ""
#: elf32-mips.c:2636
#: elf32-mips.c:2653
#, c-format
msgid "%s: ISA mismatch (%d) with previous modules (%d)"
msgstr ""
#: elf32-mips.c:2659
#: elf32-mips.c:2676
#, c-format
msgid "%s: ABI mismatch: linking %s module with previous %s modules"
msgstr ""
#: elf32-mips.c:2673 elf32-ppc.c:1478 elf64-sparc.c:2998
#: elf32-mips.c:2690 elf32-ppc.c:1478 elf64-sparc.c:2998
#, c-format
msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
msgstr ""
#: elf32-mips.c:2704
#: elf32-mips.c:2721
msgid " [abi=O32]"
msgstr ""
#: elf32-mips.c:2706
#: elf32-mips.c:2723
msgid " [abi=O64]"
msgstr ""
#: elf32-mips.c:2708
#: elf32-mips.c:2725
msgid " [abi=EABI32]"
msgstr ""
#: elf32-mips.c:2710
#: elf32-mips.c:2727
msgid " [abi=EABI64]"
msgstr ""
#: elf32-mips.c:2712
#: elf32-mips.c:2729
msgid " [abi unknown]"
msgstr ""
#: elf32-mips.c:2714
#: elf32-mips.c:2731
msgid " [abi=N32]"
msgstr ""
#: elf32-mips.c:2716
#: elf32-mips.c:2733
msgid " [abi=64]"
msgstr ""
#: elf32-mips.c:2718
#: elf32-mips.c:2735
msgid " [no abi set]"
msgstr ""
#: elf32-mips.c:2721
#: elf32-mips.c:2738
msgid " [mips1]"
msgstr ""
#: elf32-mips.c:2723
#: elf32-mips.c:2740
msgid " [mips2]"
msgstr ""
#: elf32-mips.c:2725
#: elf32-mips.c:2742
msgid " [mips3]"
msgstr ""
#: elf32-mips.c:2727
#: elf32-mips.c:2744
msgid " [mips4]"
msgstr ""
#: elf32-mips.c:2729
#: elf32-mips.c:2746
msgid " [mips5]"
msgstr ""
#: elf32-mips.c:2731
#: elf32-mips.c:2748
msgid " [mips32]"
msgstr ""
#: elf32-mips.c:2733
#: elf32-mips.c:2750
msgid " [mips64]"
msgstr ""
#: elf32-mips.c:2735
#: elf32-mips.c:2752
msgid " [unknown ISA]"
msgstr ""
#: elf32-mips.c:2738
#: elf32-mips.c:2755
msgid " [32bitmode]"
msgstr ""
#: elf32-mips.c:2740
#: elf32-mips.c:2757
msgid " [not 32bitmode]"
msgstr ""
#: elf32-mips.c:4407
#: elf32-mips.c:4424
msgid "static procedure (no name)"
msgstr ""
#: elf32-mips.c:5024 elf64-alpha.c:4418
#: elf32-mips.c:5041 elf64-alpha.c:4418
#, c-format
msgid "%s: illegal section name `%s'"
msgstr ""
#: elf32-mips.c:5589
#: elf32-mips.c:5606
msgid "not enough GOT space for local GOT entries"
msgstr ""
#: elf32-mips.c:6705
#: elf32-mips.c:6722
#, c-format
msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
msgstr ""
#: elf32-mips.c:7695
#: elf32-mips.c:7712
#, c-format
msgid "Malformed reloc detected for section %s"
msgstr ""
#: elf32-mips.c:7772
#: elf32-mips.c:7789
#, c-format
msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
msgstr ""
@ -1284,90 +1294,90 @@ msgstr ""
msgid "%s: invalid string offset %u >= %lu for section `%s'"
msgstr ""
#: elf.c:571
#: elf.c:578
msgid ""
"\n"
"Program Header:\n"
msgstr ""
#: elf.c:619
#: elf.c:626
msgid ""
"\n"
"Dynamic Section:\n"
msgstr ""
#: elf.c:748
#: elf.c:755
msgid ""
"\n"
"Version definitions:\n"
msgstr ""
#: elf.c:771
#: elf.c:778
msgid ""
"\n"
"Version References:\n"
msgstr ""
#: elf.c:776
#: elf.c:783
#, c-format
msgid " required from %s:\n"
msgstr ""
#: elf.c:1364
#: elf.c:1372
#, c-format
msgid "%s: invalid link %lu for reloc section %s (index %u)"
msgstr ""
#: elf.c:2118
#: elf.c:2133
#, c-format
msgid ""
"creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = "
"0x%.8lx\n"
msgstr ""
#: elf.c:2721
#: elf.c:2736
#, c-format
msgid "%s: Not enough room for program headers (allocated %u, need %u)"
msgstr ""
#: elf.c:2820
#: elf.c:2835
#, c-format
msgid "%s: Not enough room for program headers, try linking with -N"
msgstr ""
#: elf.c:2946
#: elf.c:2961
#, c-format
msgid "Error: First section in segment (%s) starts at 0x%x"
msgstr ""
#: elf.c:2949
#: elf.c:2964
#, c-format
msgid " whereas segment starts at 0x%x"
msgstr ""
#: elf.c:3222
#: elf.c:3237
#, c-format
msgid "%s: warning: allocated section `%s' not in segment"
msgstr ""
#: elf.c:3624
#: elf.c:3642
#, c-format
msgid "%s: symbol `%s' required but not present"
msgstr ""
#: elf.c:3633
#: elf.c:3651
#, c-format
msgid ""
"elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = "
"0x%.8lx%s\n"
msgstr ""
#: elf.c:3874
#: elf.c:3892
#, c-format
msgid "%s: warning: Empty loadable segment detected\n"
msgstr ""
#: elf.c:5254
#: elf.c:5272
#, c-format
msgid "%s: unsupported relocation type %s"
msgstr ""
@ -1402,22 +1412,22 @@ msgstr ""
msgid "%s: warning: unexpected redefinition of `%s'"
msgstr ""
#: elflink.h:3661
#: elflink.h:3675
#, c-format
msgid "warning: type and size of dynamic symbol `%s' are not defined"
msgstr ""
#: elflink.h:3933
#: elflink.h:3947
#, c-format
msgid "%s: undefined versioned symbol name %s"
msgstr ""
#: elflink.h:5182
#: elflink.h:5234
#, c-format
msgid "%s: could not find output section %s for input section %s"
msgstr ""
#: elflink.h:5560
#: elflink.h:5620
#, c-format
msgid "%s: invalid section symbol index 0x%x (%s) ingored"
msgstr ""
@ -1536,11 +1546,16 @@ msgstr ""
msgid "%s: compiled for a little endian system and target is big endian"
msgstr ""
#: linker.c:2678
#: linker.c:2684
#, c-format
msgid "Attempt to do relocateable link with %s input and %s output"
msgstr ""
#: merge.c:548
#, c-format
msgid "%s: access beyond end of merged section (%ld + %ld)"
msgstr ""
#: oasys.c:1016
#, c-format
msgid "%s: can not represent section `%s' in oasys"
@ -1594,16 +1609,6 @@ msgstr ""
msgid "%s: `ld -r' not supported with PE MIPS objects\n"
msgstr ""
#. OK, at this point the following variables are set up:
#. src = VMA of the memory we're fixing up
#. mem = pointer to memory we're fixing up
#. val = VMA of what we need to refer to
#.
#: pe-mips.c:790
#, c-format
msgid "%s: unimplemented %s\n"
msgstr ""
#: pe-mips.c:816
#, c-format
msgid "%s: jump too far away\n"

View File

@ -3101,6 +3101,13 @@ ENUMX
ENUMDOC
Intel i860 Relocations.
ENUM
BFD_RELOC_OPENRISC_ABS_26
ENUMX
BFD_RELOC_OPENRISC_REL_26
ENUMDOC
OpenRISC Relocations.
ENDSENUM
BFD_RELOC_UNUSED
CODE_FRAGMENT

View File

@ -539,6 +539,7 @@ extern const bfd_target bfd_elf32_mcore_big_vec;
extern const bfd_target bfd_elf32_mcore_little_vec;
extern const bfd_target bfd_elf32_mn10200_vec;
extern const bfd_target bfd_elf32_mn10300_vec;
extern const bfd_target bfd_elf32_openrisc_vec;
extern const bfd_target bfd_elf32_pj_vec;
extern const bfd_target bfd_elf32_pjl_vec;
extern const bfd_target bfd_elf32_powerpc_vec;

View File

@ -1,3 +1,8 @@
2001-04-20 Johan Rydberg <jrydberg@opencores.org>
* openrisc.h: New file.
* common.h (EM_OPENRISC): New constant.
2001-04-23 Bo Thorsen <bo@suse.de>
* x86-64.h: Add vtable support.

View File

@ -221,6 +221,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Written in the absense of an ABI. */
#define EM_AVR 0x1057
/* OpenRISC magic number
Written in the absense of an ABI. */
#define EM_OPENRISC 0x3426
/* See the above comment before you add a new EM_* value here. */
/* Values for e_version. */

39
include/elf/openrisc.h Normal file
View File

@ -0,0 +1,39 @@
/* OpenRISC ELF support for BFD.
Copyright 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _ELF_OPENRISC_H
#define _ELF_OPENRISC_H
#include "elf/reloc-macros.h"
/* Relocations. */
START_RELOC_NUMBERS (elf_openrisc_reloc_type)
RELOC_NUMBER (R_OPENRISC_NONE, 0)
RELOC_NUMBER (R_OPENRISC_INSN_REL_26, 1)
RELOC_NUMBER (R_OPENRISC_INSN_ABS_26, 2)
RELOC_NUMBER (R_OPENRISC_LO_16_IN_INSN, 3)
RELOC_NUMBER (R_OPENRISC_HI_16_IN_INSN, 4)
RELOC_NUMBER (R_OPENRISC_8, 5)
RELOC_NUMBER (R_OPENRISC_16, 6)
RELOC_NUMBER (R_OPENRISC_32, 7)
RELOC_NUMBER (R_OPENRISC_GNU_VTINHERIT, 8)
RELOC_NUMBER (R_OPENRISC_GNU_VTENTRY, 9)
END_RELOC_NUMBERS (R_OPENRISC_max)
#endif /* _ELF_OPENRISC_H */