forked from Imagelibrary/binutils-gdb
Compare commits
3 Commits
cr-0x5f1
...
newlib-aut
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f9cefdfe5 | ||
|
|
786ad630e6 | ||
|
|
ea22f9f817 |
226
ChangeLog
226
ChangeLog
@@ -1,227 +1,3 @@
|
||||
2006-07-25 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
Sync from GCC:
|
||||
2006-07-04 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
PR bootstrap/18058
|
||||
* configure.in: Add -fkeep-inline-functions to CFLAGS for stage 1
|
||||
if the bootstrap compiler is a GCC version that supports it.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* configure.in: Allow mingw32 and cygwin targets to build cross-gdb.
|
||||
* configure: Regenerated.
|
||||
|
||||
2006-07-18 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* Makefile.tpl (configure-stageN-MODULE): Pass --with-build-libsubdir
|
||||
for stages after the first.
|
||||
|
||||
2006-07-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* Makefile.def: Add dependencies for configure-opcodes
|
||||
on configure-intl and all-opcodes on all-intl.
|
||||
* Makefile.in: Regenerated.
|
||||
|
||||
2006-07-04 Peter O'Gorman <peter@pogma.com>
|
||||
|
||||
* ltconfig: chmod 644 before ranlib during install.
|
||||
|
||||
2006-07-03 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* configure.in: Fix thinkos in previous check-in.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-07-03 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
Sync from gcc:
|
||||
|
||||
2007-07-03 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR other/27063
|
||||
* configure.in: Test subdir_requires and give an appropriate
|
||||
error message.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-06-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
||||
|
||||
PR target/27540
|
||||
* configure.in: Only enable libgomp on IRIX 6.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-06-20 David Ayers <d.ayers@inode.at>
|
||||
|
||||
PR bootstrap/28072
|
||||
* configure.in: Add target-boehm-gc to noconfigdirs depending on
|
||||
whether target-libjava is being configured instead of whether the
|
||||
java front end is enabled.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-06-15 Mark Shinwell <shinwell@codesourcery.com>
|
||||
|
||||
* include/elf/arm.h: Correct names of R_ARM_LDC_G{0,1,2}
|
||||
to R_ARM_LDC_SB_G{0,1,2} respectively.
|
||||
|
||||
2006-06-15 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Export CFLAGS and LDFLAGS
|
||||
too.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2006-06-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
Sync from gcc:
|
||||
|
||||
2006-06-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
* configure.in: Don't enable libgomp on hpux10.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2006-06-13 David Ayers <d.ayers@inode.at>
|
||||
|
||||
Sync from gcc:
|
||||
|
||||
2006-06-12 David Ayers <d.ayers@inode.at>
|
||||
|
||||
PR bootstrap/27963
|
||||
PR target/19970
|
||||
* configure.in: Remove target-boehm-gc from noconfigdirs where
|
||||
${libgcj} is specified.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-06-08 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
Sync from gcc:
|
||||
|
||||
2005-01-12 David Edelsohn <edelsohn@gnu.org>
|
||||
Andreas Schwab <schwab@suse.de>
|
||||
|
||||
PR bootstrap/18033
|
||||
* config-ml.in: Eval option if surrounded by single quotes.
|
||||
|
||||
2006-06-07 Carlos O'Donell <carlos@codesourcery.com>
|
||||
|
||||
Sync from gcc:
|
||||
|
||||
2006-06-06 David Ayers <d.ayers@inode.at>
|
||||
|
||||
PR libobjc/13946
|
||||
* Makefile.def: Add dependencies for libobjc which boehm-gc.
|
||||
* Makefile.in: Regenerate.
|
||||
* configure.in: Add --enable-objc-gc at toplevel and have it
|
||||
enable boehm-gc for Objective-C.
|
||||
Remove target-boehm-gc from libgcj.
|
||||
Add target-boehm-gc to target_libraries.
|
||||
Add target-boehm-gc to noconfigdirs where ${libgcj}
|
||||
is specified.
|
||||
Assert that boehm-gc is supported when requested for Objective-C.
|
||||
Only build boehm-gc if needed either for Java or Objective-C.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-06-05 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR 27674
|
||||
* Makefile.tpl (configure-[+prefix+][+module+],
|
||||
all-[+prefix+][+module+]): Depend on stage_current if bootstrapping.
|
||||
Remove rule to unstage bootstrapped modules.
|
||||
(stage_current): New.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2006-05-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
Andreas Tobler <a.tobler@schweiz.ch>
|
||||
|
||||
* configure.in: Enable libgcj for hppa*-hp-hpux11*.
|
||||
* configure: Rebuilt.
|
||||
|
||||
Revert
|
||||
2006-01-31 Richard Guenther <rguenther@suse.de>
|
||||
Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* Makefile.def (target_modules): Add libgcc-math target module.
|
||||
* configure.in (target_libraries): Add libgcc-math target library.
|
||||
(--enable-libgcc-math): New configure switch.
|
||||
* Makefile.in: Re-generate.
|
||||
* configure: Re-generate.
|
||||
|
||||
2006-06-05 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* config-ml.in: Alter CCASFLAGS to include special
|
||||
multilib options the same as is done for CFLAGS.
|
||||
|
||||
2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* Makefile.def: Added dependencies from sim and gdb on intl, and
|
||||
added configure dependencies to everything with an all dependency
|
||||
on intl.
|
||||
* gettext.m4: Removed.
|
||||
* src-release (DEVO_SUPPORT): Don't mention gettext.m4.
|
||||
(GDB_SUPPORT_DIRS): Add intl.
|
||||
* Makefile.in: Regenerated.
|
||||
|
||||
2006-05-25 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* src-release (DEVO_SUPPORT): Add config.rpath.
|
||||
|
||||
2006-05-25 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* Makefile.def (bfd, opcodes): Fix lib_path.
|
||||
* Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Replace ADAC with ADAFLAGS.
|
||||
(restrap): Move under "@if gcc-bootstrap". Fix typo.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2006-05-24 Mark Shinwell <shinwell@codesourcery.com>
|
||||
|
||||
* configure.in: Enable gprof for cross builds.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-05-17 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* src-release (MAKEINFOFLAGS): Define.
|
||||
(do-proto-toplev): Pass MAKEINFOFLAGS to submakes.
|
||||
|
||||
2006-05-14 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* config.sub, config.guess: Update from upstream sources.
|
||||
|
||||
2006-05-12 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* config.sub, config.guess: Update from upstream sources.
|
||||
|
||||
2006-05-04 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
* blt, iwidgets, mmalloc: Remove directories.
|
||||
|
||||
2006-05-01 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* configure.in: Restore CFLAGS if GMP isn't present.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-04-18 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* configure.in (m32c): Build libstdc++-v3. Pass flags to
|
||||
reference libgloss so that libssp can be built in a combined
|
||||
tree.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-04-10 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* contrib: Remove directory.
|
||||
|
||||
2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
|
||||
|
||||
* Makefile.tpl: Add install-html target.
|
||||
* Makefile.def: Add install-html target.
|
||||
* Makefile.in: Regenerate.
|
||||
* configure.in: Add --with-datarootdir, --with-docdir,
|
||||
and --with-htmldir options.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-03-31 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
PR binutils/1860
|
||||
* configure.in: Require makeinfo 4.4 or higher.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-03-14 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* Makefile.in: Regenerate.
|
||||
@@ -317,7 +93,7 @@
|
||||
|
||||
2006-01-16 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* config.sub, config.guess: Sync from config repository.
|
||||
* config.sub, config.guess: Sync from config repository.
|
||||
|
||||
2006-01-05 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
|
||||
14
MAINTAINERS
14
MAINTAINERS
@@ -47,15 +47,15 @@ gdb/; readline/; sim/; GDB's part of include/
|
||||
include/
|
||||
See binutils/, gdb/, sid/, gcc/, libiberty/ etc.
|
||||
|
||||
intl/; config.rhost; libiberty/; libiberty's part of include/
|
||||
libiberty/; libiberty's part of include/
|
||||
gcc: http://gcc.gnu.org
|
||||
Changes need to be done in tandem with the official GCC
|
||||
sources or submitted to the master file maintainer and brought
|
||||
in via a merge. Note: approved patches in gcc's libiberty or
|
||||
intl are automatically approved in this libiberty and intl also;
|
||||
feel free to merge them yourself if needed sooner than the next
|
||||
merge. Otherwise, changes are automatically merged, usually
|
||||
within a day.
|
||||
in via a merge. Note: approved patches in gcc's libiberty
|
||||
are automatically approved in this libiberty also; feel free
|
||||
to merge them yourself if needed sooner than the next merge.
|
||||
Otherwise, changes are automatically merged, usually within
|
||||
a day.
|
||||
|
||||
ltconfig; ltmain.sh; ltcf-*.sh
|
||||
libtool: http://www.gnu.org/software/libtool/
|
||||
@@ -99,7 +99,7 @@ winsup/
|
||||
See also winsup/MAINTAINERS.
|
||||
|
||||
config-ml.in; makefile.vms; mkdep; setup.com;
|
||||
etc/; utils/;
|
||||
etc/; intl/; utils/;
|
||||
Any global maintainer can approve changes to these
|
||||
files and directories.
|
||||
|
||||
|
||||
24
Makefile.def
24
Makefile.def
@@ -37,8 +37,8 @@ host_modules= { module= ash; };
|
||||
host_modules= { module= autoconf; };
|
||||
host_modules= { module= automake; };
|
||||
host_modules= { module= bash; };
|
||||
host_modules= { module= bfd; lib_path=.libs; bootstrap=true; };
|
||||
host_modules= { module= opcodes; lib_path=.libs; bootstrap=true; };
|
||||
host_modules= { module= bfd; lib_path=.; bootstrap=true; };
|
||||
host_modules= { module= opcodes; lib_path=.; bootstrap=true; };
|
||||
host_modules= { module= binutils; bootstrap=true; };
|
||||
host_modules= { module= bison; no_check_cross= true; };
|
||||
host_modules= { module= byacc; no_check_cross= true; };
|
||||
@@ -117,6 +117,7 @@ host_modules= { module= gnattools; };
|
||||
target_modules = { module= libstdc++-v3; lib_path=.libs; raw_cxx=true; };
|
||||
target_modules = { module= libmudflap; lib_path=.libs; };
|
||||
target_modules = { module= libssp; lib_path=.libs; };
|
||||
target_modules = { module= libgcc-math; lib_path=.libs; };
|
||||
target_modules = { module= newlib; };
|
||||
target_modules = { module= libgfortran; };
|
||||
target_modules = { module= libobjc; };
|
||||
@@ -154,9 +155,6 @@ recursive_targets = { make_target= TAGS;
|
||||
recursive_targets = { make_target= install-info;
|
||||
depend=configure;
|
||||
depend=info; };
|
||||
recursive_targets = { make_target= install-html;
|
||||
depend=configure;
|
||||
depend=html; };
|
||||
recursive_targets = { make_target= installcheck;
|
||||
depend=configure; };
|
||||
recursive_targets = { make_target= mostlyclean; };
|
||||
@@ -174,10 +172,7 @@ flags_to_pass = { flag= bindir ; };
|
||||
flags_to_pass = { flag= datadir ; };
|
||||
flags_to_pass = { flag= exec_prefix ; };
|
||||
flags_to_pass = { flag= includedir ; };
|
||||
flags_to_pass = { flag= datarootdir ; };
|
||||
flags_to_pass = { flag= docdir ; };
|
||||
flags_to_pass = { flag= infodir ; };
|
||||
flags_to_pass = { flag= htmldir ; };
|
||||
flags_to_pass = { flag= libdir ; };
|
||||
flags_to_pass = { flag= libexecdir ; };
|
||||
flags_to_pass = { flag= lispdir ; };
|
||||
@@ -294,9 +289,7 @@ dependencies = { module=all-fixincludes; on=all-libiberty; };
|
||||
dependencies = { module=all-gnattools; on=all-target-libada; };
|
||||
|
||||
// Host modules specific to gdb.
|
||||
dependencies = { module=configure-gdb; on=configure-intl; };
|
||||
dependencies = { module=configure-gdb; on=configure-sim; };
|
||||
dependencies = { module=all-gdb; on=all-intl; };
|
||||
dependencies = { module=all-gdb; on=all-libiberty; };
|
||||
dependencies = { module=all-gdb; on=all-opcodes; };
|
||||
dependencies = { module=all-gdb; on=all-bfd; };
|
||||
@@ -313,11 +306,9 @@ dependencies = { module=all-libgui; on=all-itcl; };
|
||||
|
||||
// Host modules specific to binutils.
|
||||
dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; };
|
||||
dependencies = { module=configure-bfd; on=configure-intl; };
|
||||
dependencies = { module=all-bfd; on=all-libiberty; };
|
||||
dependencies = { module=all-bfd; on=all-intl; };
|
||||
|
||||
dependencies = { module=configure-binutils; on=configure-intl; };
|
||||
dependencies = { module=all-binutils; on=all-libiberty; };
|
||||
dependencies = { module=all-binutils; on=all-opcodes; };
|
||||
dependencies = { module=all-binutils; on=all-bfd; };
|
||||
@@ -334,17 +325,14 @@ dependencies = { module=install-binutils; on=install-opcodes; };
|
||||
// libopcodes depends on libbfd
|
||||
dependencies = { module=install-opcodes; on=install-bfd; };
|
||||
|
||||
dependencies = { module=configure-gas; on=configure-intl; };
|
||||
dependencies = { module=all-gas; on=all-libiberty; };
|
||||
dependencies = { module=all-gas; on=all-opcodes; };
|
||||
dependencies = { module=all-gas; on=all-bfd; };
|
||||
dependencies = { module=all-gas; on=all-intl; };
|
||||
dependencies = { module=configure-gprof; on=configure-intl; };
|
||||
dependencies = { module=all-gprof; on=all-libiberty; };
|
||||
dependencies = { module=all-gprof; on=all-bfd; };
|
||||
dependencies = { module=all-gprof; on=all-opcodes; };
|
||||
dependencies = { module=all-gprof; on=all-intl; };
|
||||
dependencies = { module=configure-ld; on=configure-intl; };
|
||||
dependencies = { module=all-ld; on=all-libiberty; };
|
||||
dependencies = { module=all-ld; on=all-bfd; };
|
||||
dependencies = { module=all-ld; on=all-opcodes; };
|
||||
@@ -353,10 +341,8 @@ dependencies = { module=all-ld; on=all-build-byacc; };
|
||||
dependencies = { module=all-ld; on=all-build-flex; };
|
||||
dependencies = { module=all-ld; on=all-intl; };
|
||||
|
||||
dependencies = { module=configure-opcodes; on=configure-intl; };
|
||||
dependencies = { module=all-opcodes; on=all-bfd; };
|
||||
dependencies = { module=all-opcodes; on=all-libiberty; };
|
||||
dependencies = { module=all-opcodes; on=all-intl; };
|
||||
|
||||
// Other host modules in the 'src' repository.
|
||||
dependencies = { module=all-dejagnu; on=all-tcl; };
|
||||
@@ -386,8 +372,6 @@ dependencies = { module=all-sid; on=all-tk; };
|
||||
dependencies = { module=install-sid; on=install-tcl; };
|
||||
dependencies = { module=install-sid; on=install-tk; };
|
||||
|
||||
dependencies = { module=configure-sim; on=configure-intl; };
|
||||
dependencies = { module=all-sim; on=all-intl; };
|
||||
dependencies = { module=all-sim; on=all-libiberty; };
|
||||
dependencies = { module=all-sim; on=all-bfd; };
|
||||
dependencies = { module=all-sim; on=all-opcodes; };
|
||||
@@ -461,9 +445,7 @@ dependencies = { module=all-target-libjava; on=all-target-zlib; };
|
||||
dependencies = { module=all-target-libjava; on=all-target-boehm-gc; };
|
||||
dependencies = { module=all-target-libjava; on=all-target-qthreads; };
|
||||
dependencies = { module=all-target-libjava; on=all-target-libffi; };
|
||||
dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
|
||||
dependencies = { module=all-target-libobjc; on=all-target-libiberty; };
|
||||
dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
|
||||
dependencies = { module=all-target-libstdc++-v3; on=all-target-libiberty; };
|
||||
|
||||
// Target modules in the 'src' repository.
|
||||
|
||||
3674
Makefile.in
3674
Makefile.in
File diff suppressed because it is too large
Load Diff
43
Makefile.tpl
43
Makefile.tpl
@@ -53,9 +53,6 @@ libdir = @libdir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = @oldincludedir@
|
||||
infodir = @infodir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
htmldir = @htmldir@
|
||||
mandir = @mandir@
|
||||
man1dir = $(mandir)/man1
|
||||
man2dir = $(mandir)/man2
|
||||
@@ -180,9 +177,7 @@ POSTSTAGE1_HOST_EXPORTS = \
|
||||
CC_FOR_BUILD="$(STAGE_CC_WRAPPER) \
|
||||
$$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
|
||||
-B$$r/$(HOST_SUBDIR)/prev-gcc/ \
|
||||
-B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \
|
||||
CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
|
||||
LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS;
|
||||
-B$(build_tooldir)/bin/"; export CC_FOR_BUILD;
|
||||
|
||||
# Target libraries are put under this directory:
|
||||
TARGET_SUBDIR = @target_subdir@
|
||||
@@ -537,7 +532,7 @@ do-[+make_target+]:
|
||||
|
||||
# Here are the targets which correspond to the do-X targets.
|
||||
|
||||
.PHONY: info installcheck dvi html install-info install-html
|
||||
.PHONY: info installcheck dvi html install-info
|
||||
.PHONY: clean distclean mostlyclean maintainer-clean realclean
|
||||
.PHONY: local-clean local-distclean local-maintainer-clean
|
||||
info: do-info
|
||||
@@ -555,8 +550,6 @@ install-info: do-install-info dir.info
|
||||
$(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
|
||||
else true ; fi
|
||||
|
||||
install-html: do-install-html
|
||||
|
||||
local-clean:
|
||||
-rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
|
||||
|
||||
@@ -722,12 +715,14 @@ TAGS: do-TAGS
|
||||
[+ DEFINE configure +]
|
||||
.PHONY: configure-[+prefix+][+module+] maybe-configure-[+prefix+][+module+]
|
||||
maybe-configure-[+prefix+][+module+]:
|
||||
@if gcc-bootstrap
|
||||
configure-[+prefix+][+module+]: stage_current
|
||||
@endif gcc-bootstrap
|
||||
@if [+prefix+][+module+]
|
||||
maybe-configure-[+prefix+][+module+]: configure-[+prefix+][+module+]
|
||||
configure-[+prefix+][+module+]: [+ IF bootstrap +][+ ELSE +]
|
||||
configure-[+prefix+][+module+]: [+ IF bootstrap +]
|
||||
@endif [+prefix+][+module+]
|
||||
@if [+prefix+][+module+]-bootstrap
|
||||
@if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
|
||||
@endif [+prefix+][+module+]-bootstrap
|
||||
@if [+prefix+][+module+][+ ELSE bootstrap +]
|
||||
@: $(MAKE); $(unstage)[+ ENDIF bootstrap +]
|
||||
@r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
@@ -802,7 +797,6 @@ configure-stage[+id+]-[+prefix+][+module+]:
|
||||
libsrcdir="$$s/[+module+]"; \
|
||||
$(SHELL) $${libsrcdir}/configure \
|
||||
[+args+] $${srcdiroption} \
|
||||
[+ IF prev +]--with-build-libsubdir=$(HOST_SUBDIR)[+ ENDIF prev +] \
|
||||
[+stage_configure_flags+] [+extra_configure_flags+]
|
||||
@endif [+prefix+][+module+]-bootstrap
|
||||
[+ ENDFOR bootstrap_stage +]
|
||||
@@ -812,14 +806,16 @@ configure-stage[+id+]-[+prefix+][+module+]:
|
||||
[+ DEFINE all +]
|
||||
.PHONY: all-[+prefix+][+module+] maybe-all-[+prefix+][+module+]
|
||||
maybe-all-[+prefix+][+module+]:
|
||||
@if gcc-bootstrap
|
||||
all-[+prefix+][+module+]: stage_current
|
||||
@endif gcc-bootstrap
|
||||
@if [+prefix+][+module+]
|
||||
TARGET-[+prefix+][+module+]=[+
|
||||
IF target +][+target+][+ ELSE +]all[+ ENDIF target +]
|
||||
maybe-all-[+prefix+][+module+]: all-[+prefix+][+module+]
|
||||
all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELSE +]
|
||||
all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +]
|
||||
@endif [+prefix+][+module+]
|
||||
@if [+prefix+][+module+]-bootstrap
|
||||
@if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
|
||||
@endif [+prefix+][+module+]-bootstrap
|
||||
@if [+prefix+][+module+][+ ELSE bootstrap +]
|
||||
@: $(MAKE); $(unstage)[+ ENDIF bootstrap +]
|
||||
@r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
@@ -1258,7 +1254,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \
|
||||
CFLAGS="$(BOOT_CFLAGS)" \
|
||||
LIBCFLAGS="$(BOOT_CFLAGS)" \
|
||||
LDFLAGS="$(BOOT_LDFLAGS)" \
|
||||
"`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
|
||||
ADAC="\$$(CC)"
|
||||
|
||||
# For stage 1:
|
||||
# * We force-disable intermodule optimizations, even if
|
||||
@@ -1427,19 +1423,14 @@ do-distclean: distclean-stage1
|
||||
# not work as a dependency, just as the minimum necessary to avoid errors.
|
||||
stage_last:
|
||||
$(MAKE) $(RECURSE_FLAGS_TO_PASS) stage1-bubble
|
||||
|
||||
# Same as unstage, but not phony and defaulting to stage1-start. We place
|
||||
# it in the dependency so that for example `make -j3 all-gcc' works.
|
||||
stage_current:
|
||||
@if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
|
||||
@endif gcc-bootstrap
|
||||
|
||||
.PHONY: restrap
|
||||
restrap:
|
||||
@: $(MAKE); $(stage)
|
||||
rm -rf stage1-$(TARGET_SUBDIR) [+ FOR bootstrap-stage +][+ IF prev
|
||||
+]stage[+id+]-* [+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
|
||||
+]stage[+id+] [+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
|
||||
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all
|
||||
@endif gcc-bootstrap
|
||||
|
||||
# --------------------------------------
|
||||
# Dependencies between different modules
|
||||
|
||||
142
compile
Executable file
142
compile
Executable file
@@ -0,0 +1,142 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
@@ -108,11 +108,6 @@ ml_realsrcdir=${srcdir}
|
||||
ml_verbose=--verbose
|
||||
for option in ${ac_configure_args}
|
||||
do
|
||||
# strip single quotes surrounding individual options
|
||||
case $option in
|
||||
\'*\') eval option=$option ;;
|
||||
esac
|
||||
|
||||
case $option in
|
||||
--*) ;;
|
||||
-*) option=-$option ;;
|
||||
@@ -551,7 +546,6 @@ multi-do:
|
||||
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
|
||||
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
|
||||
CFLAGS="$(CFLAGS) $${flags}" \
|
||||
CCASFLAGS="$(CCASFLAGS) $${flags}" \
|
||||
FCFLAGS="$(FCFLAGS) $${flags}" \
|
||||
FFLAGS="$(FFLAGS) $${flags}" \
|
||||
ADAFLAGS="$(ADAFLAGS) $${flags}" \
|
||||
|
||||
34
config.guess
vendored
34
config.guess
vendored
@@ -1,10 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2006-05-13'
|
||||
timestamp='2006-01-02'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -107,7 +106,7 @@ set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
@@ -771,8 +770,6 @@ EOF
|
||||
case ${UNAME_MACHINE} in
|
||||
pc98)
|
||||
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
amd64)
|
||||
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
esac
|
||||
@@ -791,10 +788,7 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit ;;
|
||||
x86:Interix*:[345]*)
|
||||
echo i586-pc-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
EM64T:Interix*:[345]*)
|
||||
echo x86_64-unknown-interix${UNAME_RELEASE}
|
||||
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
|
||||
exit ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
@@ -865,11 +859,7 @@ EOF
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^CPU/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
mips64:Linux:*:*)
|
||||
@@ -888,11 +878,7 @@ EOF
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^CPU/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
@@ -989,7 +975,7 @@ EOF
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
#if defined(__INTEL_COMPILER) || defined(__PGI)
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
@@ -999,11 +985,7 @@ EOF
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^LIBC/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
|
||||
test x"${LIBC}" != x && {
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
exit
|
||||
|
||||
42
config.sub
vendored
42
config.sub
vendored
@@ -1,10 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2006-05-13'
|
||||
timestamp='2006-01-02'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -249,8 +248,7 @@ case $basic_machine in
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore \
|
||||
| m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
@@ -270,17 +268,16 @@ case $basic_machine in
|
||||
| mn10200 | mn10300 \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nios | nios2 \
|
||||
| ns16k | ns32k \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
@@ -288,6 +285,9 @@ case $basic_machine in
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m32c)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
# Motorola 68HC11/12.
|
||||
basic_machine=$basic_machine-unknown
|
||||
@@ -328,7 +328,7 @@ case $basic_machine in
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
@@ -350,18 +350,17 @@ case $basic_machine in
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nios-* | nios2-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tron-* \
|
||||
@@ -372,6 +371,8 @@ case $basic_machine in
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
m32c-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
386bsd)
|
||||
@@ -1125,7 +1126,7 @@ case $basic_machine in
|
||||
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@@ -1366,9 +1367,6 @@ else
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
spu-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
@@ -1378,9 +1376,9 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
|
||||
@@ -1,40 +1,7 @@
|
||||
2006-07-25 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR build/26188
|
||||
* stdint.m4: Test for uintptr_t even on systems with uint64_t or uint32_t.
|
||||
|
||||
Sync from GCC
|
||||
2006-07-21 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
PR target/26792
|
||||
* unwind_ipinfo.m4: New.
|
||||
|
||||
2006-07-21 David Daney <ddaney@avtrex.com>
|
||||
|
||||
PR libgcj/28426
|
||||
* gxx-include-dir.m4: Use target_alias in path for cross build.
|
||||
|
||||
2006-07-18 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* acx.m4: Support --with-build-libsubdir and AC_SUBST
|
||||
build_libsubdir.
|
||||
|
||||
2006-06-13 Richard Earnshaw <rearnsha@arm.com>
|
||||
Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* (ZW_GNU_GETTEXT_SISTER_DIR): Add optional
|
||||
argument for where to search for NLS config file.
|
||||
|
||||
2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Provide some
|
||||
defines otherwise gotten from AM_GNU_GETTEXT. Remove the
|
||||
po/ prefix from CATALOGS.
|
||||
|
||||
2006-02-14 Paolo Bonzini <bonzini@gnu.org>
|
||||
Andreas Schwab <schwab@suse.de>
|
||||
Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Use correct program name.
|
||||
* acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Use correct program name.
|
||||
(ACX_CHECK_INSTALLED_TARGET_TOOL): Likewise, and always set $1.
|
||||
|
||||
2006-01-26 Paolo Bonzini <bonzini@gnu.org>
|
||||
@@ -48,19 +15,19 @@
|
||||
|
||||
2006-01-02 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR target/25259
|
||||
* stdint.m4: New.
|
||||
PR target/25259
|
||||
* stdint.m4: New.
|
||||
|
||||
2005-12-20 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
Revert Ada-related part of the previous change.
|
||||
Revert Ada-related part of the previous change.
|
||||
|
||||
* mt-ppc-aix: Delete.
|
||||
* mt-ppc-aix: Delete.
|
||||
|
||||
2005-12-19 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* mt-ppc-aix, mh-ppc-aix: New.
|
||||
|
||||
|
||||
* mt-ppc-aix, mh-ppc-aix: New.
|
||||
|
||||
2005-12-05 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* acx.m4 (GCC_TARGET_TOOL): New.
|
||||
|
||||
@@ -74,22 +74,8 @@ dnl # amount to a lot more with autoconf 2.5x.
|
||||
AC_DEFUN([GCC_TOPLEV_SUBDIRS],
|
||||
[AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_TARGET]) []dnl
|
||||
AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_BUILD]) []dnl
|
||||
|
||||
# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
|
||||
# have matching libraries, they should use host libraries: Makefile.tpl
|
||||
# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
|
||||
# However, they still use the build modules, because the corresponding
|
||||
# host modules (e.g. bison) are only built for the host when bootstrap
|
||||
# finishes. So:
|
||||
# - build_subdir is where we find build modules, and never changes.
|
||||
# - build_libsubdir is where we find build libraries, and can be overridden.
|
||||
|
||||
# Prefix 'build-' so this never conflicts with target_subdir.
|
||||
build_subdir="build-${build_noncanonical}"
|
||||
AC_ARG_WITH(build-libsubdir,
|
||||
[ --with-build-libsubdir=[DIR] Directory where to find libraries for build system],
|
||||
build_libsubdir="$withval",
|
||||
build_libsubdir="$build_subdir")
|
||||
# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
|
||||
if ( test $srcdir = . && test -d gcc ) \
|
||||
|| test -d $srcdir/../host-${host_noncanonical}; then
|
||||
@@ -99,7 +85,6 @@ else
|
||||
fi
|
||||
# No prefix.
|
||||
target_subdir=${target_noncanonical}
|
||||
AC_SUBST([build_libsubdir]) []dnl
|
||||
AC_SUBST([build_subdir]) []dnl
|
||||
AC_SUBST([host_subdir]) []dnl
|
||||
AC_SUBST([target_subdir]) []dnl
|
||||
|
||||
@@ -19,9 +19,8 @@ INCINTL= AC_SUBST(INCINTL)
|
||||
XGETTEXT= AC_SUBST(XGETTEXT)
|
||||
GMSGFMT= AC_SUBST(GMSGFMT)
|
||||
POSUB= AC_SUBST(POSUB)
|
||||
|
||||
if test -f ifelse([$1],,[../intl],[$1])/config.intl; then
|
||||
. ifelse([$1],,[../intl],[$1])/config.intl
|
||||
if test -f ../intl/config.intl; then
|
||||
. ../intl/config.intl
|
||||
fi
|
||||
AC_MSG_CHECKING([whether NLS is requested])
|
||||
if test x"$USE_NLS" != xyes; then
|
||||
@@ -47,8 +46,8 @@ else
|
||||
# by the backticks, then collapsed again by the double quotes,
|
||||
# leaving us with one backslash in the sed expression (right
|
||||
# before the dot that mustn't act as a wildcard).
|
||||
cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
|
||||
lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
|
||||
cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
|
||||
lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
|
||||
# The user is allowed to set LINGUAS to a list of languages to
|
||||
# install catalogs for. If it's empty that means "all of them."
|
||||
if test "x$LINGUAS" = x; then
|
||||
@@ -64,17 +63,4 @@ else
|
||||
done
|
||||
LINGUAS="$XLINGUAS"
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
|
||||
dnl Set up some additional variables which our po/Make-in files
|
||||
dnl may need.
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using these.
|
||||
DATADIRNAME=share
|
||||
AC_SUBST(DATADIRNAME)
|
||||
INSTOBJEXT=.mo
|
||||
AC_SUBST(INSTOBJEXT)
|
||||
GENCAT=gencat
|
||||
AC_SUBST(GENCAT)
|
||||
CATOBJEXT=.gmo
|
||||
AC_SUBST(CATOBJEXT)
|
||||
fi])
|
||||
|
||||
@@ -17,13 +17,7 @@ case "${with_gxx_include_dir}" in
|
||||
yes) gxx_include_dir='$(libsubdir)/include/c++' ;;
|
||||
*)
|
||||
libstdcxx_incdir='c++/$(gcc_version)'
|
||||
gxx_include_dir='include/$(libstdcxx_incdir)'
|
||||
if test -n "$with_cross_host" &&
|
||||
test x"$with_cross_host" != x"no"; then
|
||||
gxx_include_dir='${prefix}/${target_alias}/'"$gxx_include_dir"
|
||||
else
|
||||
gxx_include_dir='${prefix}/'"$gxx_include_dir"
|
||||
fi;;
|
||||
gxx_include_dir='$(prefix)/include/$(libstdcxx_incdir)' ;;
|
||||
esac ;;
|
||||
*) gxx_include_dir=${with_gxx_include_dir} ;;
|
||||
esac
|
||||
|
||||
@@ -61,17 +61,14 @@ for i in stdint.h $inttype_headers; do
|
||||
break
|
||||
done
|
||||
if test "$acx_cv_header_stdint" = stddef.h; then
|
||||
acx_cv_header_stdint_kind="(lacks uintmax_t)"
|
||||
acx_cv_header_stdint_kind="(lacks uintptr_t)"
|
||||
for i in stdint.h $inttype_headers; do
|
||||
unset ac_cv_type_uintptr_t
|
||||
unset ac_cv_type_uint32_t
|
||||
unset ac_cv_type_uint64_t
|
||||
_AS_ECHO_N([looking for an incomplete stdint.h in $i, ])
|
||||
AC_CHECK_TYPE(uint32_t,[acx_cv_header_stdint=$i],continue,[#include <sys/types.h>
|
||||
#include <$i>])
|
||||
AC_CHECK_TYPE(uint64_t,,,[#include <sys/types.h>
|
||||
#include <$i>])
|
||||
AC_CHECK_TYPE(uintptr_t,,,[#include <sys/types.h>
|
||||
AC_CHECK_TYPE(uint64_t,,[acx_cv_header_stdint_kind="(lacks uintptr_t and uint64_t)"], [#include <sys/types.h>
|
||||
#include <$i>])
|
||||
break
|
||||
done
|
||||
@@ -84,7 +81,7 @@ if test "$acx_cv_header_stdint" = stddef.h; then
|
||||
_AS_ECHO_N([looking for u_intXX_t types in $i, ])
|
||||
AC_CHECK_TYPE(u_int32_t,[acx_cv_header_stdint=$i],continue,[#include <sys/types.h>
|
||||
#include <$i>])
|
||||
AC_CHECK_TYPE(u_int64_t,,,[#include <sys/types.h>
|
||||
AC_CHECK_TYPE(u_int64_t,,[acx_cv_header_stdint_kind="(u_intXX_t style, lacks u_int64_t)"], [#include <sys/types.h>
|
||||
#include <$i>])
|
||||
break
|
||||
done
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
dnl
|
||||
dnl Check whether _Unwind_GetIPInfo is available.
|
||||
dnl
|
||||
AC_DEFUN([GCC_CHECK_UNWIND_GETIPINFO], [
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
||||
AC_MSG_CHECKING([for _Unwind_GetIPInfo])
|
||||
AC_CACHE_VAL(gcc_cv_getipinfo, [
|
||||
AC_TRY_LINK([extern "C" { extern void _Unwind_GetIPInfo(); }],
|
||||
[_Unwind_GetIPInfo();],
|
||||
[gcc_cv_getipinfo=yes],
|
||||
[gcc_cv_getipinfo=no])
|
||||
])
|
||||
if test $gcc_cv_getipinfo = yes; then
|
||||
AC_DEFINE(HAVE_GETIPINFO, 1, [Define if _Unwind_GetIPInfo is available.])
|
||||
fi
|
||||
AC_MSG_RESULT($gcc_cv_getipinfo)
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
133
configure.in
133
configure.in
@@ -134,6 +134,7 @@ host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb
|
||||
|
||||
# libgcj represents the runtime libraries only used by gcj.
|
||||
libgcj="target-libffi \
|
||||
target-boehm-gc \
|
||||
target-zlib \
|
||||
target-qthreads \
|
||||
target-libjava"
|
||||
@@ -147,8 +148,8 @@ target_libraries="target-libiberty \
|
||||
target-libstdc++-v3 \
|
||||
target-libmudflap \
|
||||
target-libssp \
|
||||
target-libgcc-math \
|
||||
target-libgfortran \
|
||||
target-boehm-gc \
|
||||
${libgcj} \
|
||||
target-libobjc \
|
||||
target-libada \
|
||||
@@ -226,7 +227,7 @@ esac
|
||||
|
||||
# Some tools are only suitable for building in a "native" situation.
|
||||
# Remove these if host!=target.
|
||||
native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
|
||||
native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
|
||||
|
||||
# Similarly, some are only suitable for cross toolchains.
|
||||
# Remove these if host=target.
|
||||
@@ -312,6 +313,18 @@ AC_ARG_ENABLE(libssp,
|
||||
ENABLE_LIBSSP=$enableval,
|
||||
ENABLE_LIBSSP=yes)
|
||||
|
||||
# Set the default so we build libgcc-math for ix86 and x86_64
|
||||
AC_ARG_ENABLE(libgcc-math,
|
||||
[ --enable-libgcc-math Builds libgcc-math directory],,
|
||||
[
|
||||
case "${target}" in
|
||||
i?86-* | x86_64-* )
|
||||
enable_libgcc_math=yes ;;
|
||||
*)
|
||||
enable_libgcc_math=no ;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Save it here so that, even in case of --enable-libgcj, if the Java
|
||||
# front-end isn't enabled, we still get libgcj disabled.
|
||||
libgcj_saved=$libgcj
|
||||
@@ -353,7 +366,7 @@ if test x$enable_libgomp = x ; then
|
||||
;;
|
||||
*-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
|
||||
;;
|
||||
*-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
|
||||
*-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*)
|
||||
;;
|
||||
*-*-darwin* | *-*-aix*)
|
||||
;;
|
||||
@@ -432,6 +445,9 @@ case "${target}" in
|
||||
*-*-vxworks*)
|
||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-libstdc++-v3 ${libgcj}"
|
||||
;;
|
||||
m32c-*-*)
|
||||
noconfigdirs="$noconfigdirs target-libstdc++-v3"
|
||||
;;
|
||||
alpha*-dec-osf*)
|
||||
# ld works, but does not support shared libraries.
|
||||
# newlib is not 64 bit ready. I'm not sure about fileutils.
|
||||
@@ -571,9 +587,6 @@ case "${target}" in
|
||||
hppa*64*-*-*)
|
||||
noconfigdirs="$noconfigdirs ${libgcj}"
|
||||
;;
|
||||
hppa*-hp-hpux11*)
|
||||
noconfigdirs="$noconfigdirs ld shellutils"
|
||||
;;
|
||||
hppa*-*-*)
|
||||
# According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
|
||||
# build on HP-UX 10.20.
|
||||
@@ -617,6 +630,13 @@ case "${target}" in
|
||||
i[[3456789]]86-*-mingw32*)
|
||||
target_configdirs="$target_configdirs target-mingw"
|
||||
noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
|
||||
|
||||
# Can't build gdb for mingw32 if not native.
|
||||
case "${host}" in
|
||||
i[[3456789]]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
|
||||
*) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*-*-cygwin*)
|
||||
target_configdirs="$target_configdirs target-libtermcap target-winsup"
|
||||
@@ -627,6 +647,13 @@ case "${target}" in
|
||||
elif test -d "$srcdir/newlib"; then
|
||||
echo "Warning: winsup is missing so newlib can't be built."
|
||||
fi
|
||||
|
||||
# Can't build gdb for Cygwin if not native.
|
||||
case "${host}" in
|
||||
*-*-cygwin*) ;; # keep gdb tcl tk expect etc.
|
||||
*) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
i[[3456789]]86-moss-msdos | i[[3456789]]86-*-moss* | \
|
||||
i[[3456789]]86-*-uwin* | i[[3456789]]86-*-interix* )
|
||||
@@ -1118,8 +1145,8 @@ if test x"$have_gmp" = xyes; then
|
||||
#include <mpfr.h>], [mpfr_t n; mpfr_init(n);],
|
||||
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
|
||||
LIBS="$saved_LIBS"
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
fi
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
|
||||
# Flags needed for both GMP and/or MPFR
|
||||
AC_SUBST(gmplibs)
|
||||
@@ -1205,7 +1232,6 @@ if test -d ${srcdir}/gcc; then
|
||||
language=
|
||||
target_libs=
|
||||
lang_dirs=
|
||||
subdir_requires=
|
||||
boot_language=
|
||||
build_by_default=
|
||||
need_gmp=
|
||||
@@ -1239,21 +1265,6 @@ if test -d ${srcdir}/gcc; then
|
||||
;;
|
||||
esac
|
||||
|
||||
# Disable languages that need other directories if these aren't available.
|
||||
for i in $subdir_requires; do
|
||||
test -f "$srcdir/gcc/$i/config-lang.in" && continue
|
||||
case ,${enable_languages}, in
|
||||
*,${language},*)
|
||||
# Specifically requested language; tell them.
|
||||
AC_MSG_ERROR([The gcc/$i directory contains parts of $language but is missing])
|
||||
;;
|
||||
*)
|
||||
# Silently disable.
|
||||
add_this_lang=no
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Disable languages that need GMP if it isn't available.
|
||||
case ,${enable_languages},:${have_gmp}:${need_gmp} in
|
||||
*,${language},*:no:yes)
|
||||
@@ -1315,29 +1326,6 @@ for dir in $configdirs $build_configdirs $target_configdirs ; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Check for Boehm's garbage collector
|
||||
AC_ARG_ENABLE(objc-gc,
|
||||
[ --enable-objc-gc enable the use of Boehm's garbage collector with
|
||||
the GNU Objective-C runtime.],
|
||||
[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
|
||||
*,objc,*:*:yes:*target-boehm-gc*)
|
||||
AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration])
|
||||
;;
|
||||
esac])
|
||||
|
||||
# Make sure we only build Boehm's garbage collector if required.
|
||||
case ,${enable_languages},:${enable_objc_gc} in
|
||||
*,objc,*:yes)
|
||||
# Keep target-boehm-gc if requested for Objective-C.
|
||||
;;
|
||||
*)
|
||||
# Otherwise remove target-boehm-gc depending on target-libjava.
|
||||
if echo " ${noconfigdirs} " | grep "target-libjava" >/dev/null 2>&1; then
|
||||
noconfigdirs="$noconfigdirs target-boehm-gc"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
|
||||
# $build_configdirs and $target_configdirs.
|
||||
# If we have the source for $noconfigdirs entries, add them to $notsupp.
|
||||
@@ -2141,20 +2129,6 @@ if test "x${use_gnu_ld}" = x &&
|
||||
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
|
||||
fi
|
||||
|
||||
# Search for other target-specific linker scripts and such.
|
||||
case "${target}" in
|
||||
m32c-*-* )
|
||||
if test -d ${srcdir}/libgloss/m32c; then
|
||||
# This is for crt0.o
|
||||
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/m32c'
|
||||
# This is for r8c.ld
|
||||
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/m32c'
|
||||
# This is for libnosys.a
|
||||
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Makefile fragments.
|
||||
for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
|
||||
do
|
||||
@@ -2229,10 +2203,10 @@ case " $build_configdirs " in
|
||||
*" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
|
||||
*)
|
||||
changequote(,)
|
||||
# For an installed makeinfo, we require it to be from texinfo 4.4 or
|
||||
# For an installed makeinfo, we require it to be from texinfo 4.2 or
|
||||
# higher, else we use the "missing" dummy.
|
||||
if ${MAKEINFO} --version \
|
||||
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
|
||||
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
|
||||
:
|
||||
else
|
||||
MAKEINFO="$MISSING makeinfo"
|
||||
@@ -2397,21 +2371,6 @@ case $build in
|
||||
stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
|
||||
;;
|
||||
esac
|
||||
|
||||
# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
|
||||
if test "$GCC" = yes; then
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
|
||||
# Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
|
||||
CFLAGS="$CFLAGS -fkeep-inline-functions"
|
||||
AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
|
||||
AC_TRY_COMPILE(,,
|
||||
[AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"],
|
||||
[AC_MSG_RESULT([no])])
|
||||
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
fi
|
||||
|
||||
AC_SUBST(stage1_cflags)
|
||||
|
||||
# Enable -Werror in bootstrap stage2 and later.
|
||||
@@ -2425,24 +2384,4 @@ case ${enable_werror} in
|
||||
esac
|
||||
AC_SUBST(stage2_werror_flag)
|
||||
|
||||
# Flags needed to enable html installing and building
|
||||
AC_ARG_WITH(datarootdir,
|
||||
[ --with-datarootdir Use datarootdir as the data root directory.],
|
||||
[datarootdir="\${prefix}/${withval}"],
|
||||
[datarootdir="\${prefix}/share"])
|
||||
|
||||
AC_ARG_WITH(docdir,
|
||||
[ --with-docdir Install documentation in this directory.],
|
||||
[docdir="\${prefix}/${withval}"],
|
||||
[docdir="\${datarootdir}/doc"])
|
||||
|
||||
AC_ARG_WITH(htmldir,
|
||||
[ --with-htmldir Install html in this directory.],
|
||||
[htmldir="\${prefix}/${withval}"],
|
||||
[htmldir="\${docdir}"])
|
||||
|
||||
AC_SUBST(datarootdir)
|
||||
AC_SUBST(docdir)
|
||||
AC_SUBST(htmldir)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
|
||||
7
contrib/ChangeLog
Normal file
7
contrib/ChangeLog
Normal file
@@ -0,0 +1,7 @@
|
||||
2002-07-03 Nick Clifton <nickc@cambridge.redhat.com>
|
||||
|
||||
* ChangeLog: Newly created.
|
||||
* texi2pod.pl: Imported from FSF GCC sources.
|
||||
|
||||
|
||||
|
||||
431
contrib/texi2pod.pl
Executable file
431
contrib/texi2pod.pl
Executable file
@@ -0,0 +1,431 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
# This file is part of GNU CC.
|
||||
|
||||
# GNU CC 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, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# GNU CC 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 GNU CC; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
# Boston MA 02111-1307, USA.
|
||||
|
||||
# This does trivial (and I mean _trivial_) conversion of Texinfo
|
||||
# markup to Perl POD format. It's intended to be used to extract
|
||||
# something suitable for a manpage from a Texinfo document.
|
||||
|
||||
$output = 0;
|
||||
$skipping = 0;
|
||||
%sects = ();
|
||||
$section = "";
|
||||
@icstack = ();
|
||||
@endwstack = ();
|
||||
@skstack = ();
|
||||
@instack = ();
|
||||
$shift = "";
|
||||
%defs = ();
|
||||
$fnno = 1;
|
||||
$inf = "";
|
||||
$ibase = "";
|
||||
|
||||
while ($_ = shift) {
|
||||
if (/^-D(.*)$/) {
|
||||
if ($1 ne "") {
|
||||
$flag = $1;
|
||||
} else {
|
||||
$flag = shift;
|
||||
}
|
||||
$value = "";
|
||||
($flag, $value) = ($flag =~ /^([^=]+)(?:=(.+))?/);
|
||||
die "no flag specified for -D\n"
|
||||
unless $flag ne "";
|
||||
die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
|
||||
unless $flag =~ /^[a-zA-Z0-9_-]+$/;
|
||||
$defs{$flag} = $value;
|
||||
} elsif (/^-/) {
|
||||
usage();
|
||||
} else {
|
||||
$in = $_, next unless defined $in;
|
||||
$out = $_, next unless defined $out;
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (defined $in) {
|
||||
$inf = gensym();
|
||||
open($inf, "<$in") or die "opening \"$in\": $!\n";
|
||||
$ibase = $1 if $in =~ m|^(.+)/[^/]+$|;
|
||||
} else {
|
||||
$inf = \*STDIN;
|
||||
}
|
||||
|
||||
if (defined $out) {
|
||||
open(STDOUT, ">$out") or die "opening \"$out\": $!\n";
|
||||
}
|
||||
|
||||
while(defined $inf) {
|
||||
while(<$inf>) {
|
||||
# Certain commands are discarded without further processing.
|
||||
/^\@(?:
|
||||
[a-z]+index # @*index: useful only in complete manual
|
||||
|need # @need: useful only in printed manual
|
||||
|(?:end\s+)?group # @group .. @end group: ditto
|
||||
|page # @page: ditto
|
||||
|node # @node: useful only in .info file
|
||||
|(?:end\s+)?ifnottex # @ifnottex .. @end ifnottex: use contents
|
||||
)\b/x and next;
|
||||
|
||||
chomp;
|
||||
|
||||
# Look for filename and title markers.
|
||||
/^\@setfilename\s+([^.]+)/ and $fn = $1, next;
|
||||
/^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next;
|
||||
|
||||
# Identify a man title but keep only the one we are interested in.
|
||||
/^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do {
|
||||
if (exists $defs{$1}) {
|
||||
$fn = $1;
|
||||
$tl = postprocess($2);
|
||||
}
|
||||
next;
|
||||
};
|
||||
|
||||
# Look for blocks surrounded by @c man begin SECTION ... @c man end.
|
||||
# This really oughta be @ifman ... @end ifman and the like, but such
|
||||
# would require rev'ing all other Texinfo translators.
|
||||
/^\@c\s+man\s+begin\s+([A-Z]+)\s+([A-Za-z0-9-]+)/ and do {
|
||||
$output = 1 if exists $defs{$2};
|
||||
$sect = $1;
|
||||
next;
|
||||
};
|
||||
/^\@c\s+man\s+begin\s+([A-Z]+)/ and $sect = $1, $output = 1, next;
|
||||
/^\@c\s+man\s+end/ and do {
|
||||
$sects{$sect} = "" unless exists $sects{$sect};
|
||||
$sects{$sect} .= postprocess($section);
|
||||
$section = "";
|
||||
$output = 0;
|
||||
next;
|
||||
};
|
||||
|
||||
# handle variables
|
||||
/^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do {
|
||||
$defs{$1} = $2;
|
||||
next;
|
||||
};
|
||||
/^\@clear\s+([a-zA-Z0-9_-]+)/ and do {
|
||||
delete $defs{$1};
|
||||
next;
|
||||
};
|
||||
|
||||
next unless $output;
|
||||
|
||||
# Discard comments. (Can't do it above, because then we'd never see
|
||||
# @c man lines.)
|
||||
/^\@c\b/ and next;
|
||||
|
||||
# End-block handler goes up here because it needs to operate even
|
||||
# if we are skipping.
|
||||
/^\@end\s+([a-z]+)/ and do {
|
||||
# Ignore @end foo, where foo is not an operation which may
|
||||
# cause us to skip, if we are presently skipping.
|
||||
my $ended = $1;
|
||||
next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex)$/;
|
||||
|
||||
die "\@end $ended without \@$ended at line $.\n" unless defined $endw;
|
||||
die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw;
|
||||
|
||||
$endw = pop @endwstack;
|
||||
|
||||
if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) {
|
||||
$skipping = pop @skstack;
|
||||
next;
|
||||
} elsif ($ended =~ /^(?:example|smallexample|display)$/) {
|
||||
$shift = "";
|
||||
$_ = ""; # need a paragraph break
|
||||
} elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) {
|
||||
$_ = "\n=back\n";
|
||||
$ic = pop @icstack;
|
||||
} else {
|
||||
die "unknown command \@end $ended at line $.\n";
|
||||
}
|
||||
};
|
||||
|
||||
# We must handle commands which can cause skipping even while we
|
||||
# are skipping, otherwise we will not process nested conditionals
|
||||
# correctly.
|
||||
/^\@ifset\s+([a-zA-Z0-9_-]+)/ and do {
|
||||
push @endwstack, $endw;
|
||||
push @skstack, $skipping;
|
||||
$endw = "ifset";
|
||||
$skipping = 1 unless exists $defs{$1};
|
||||
next;
|
||||
};
|
||||
|
||||
/^\@ifclear\s+([a-zA-Z0-9_-]+)/ and do {
|
||||
push @endwstack, $endw;
|
||||
push @skstack, $skipping;
|
||||
$endw = "ifclear";
|
||||
$skipping = 1 if exists $defs{$1};
|
||||
next;
|
||||
};
|
||||
|
||||
/^\@(ignore|menu|iftex)\b/ and do {
|
||||
push @endwstack, $endw;
|
||||
push @skstack, $skipping;
|
||||
$endw = $1;
|
||||
$skipping = 1;
|
||||
next;
|
||||
};
|
||||
|
||||
next if $skipping;
|
||||
|
||||
# Character entities. First the ones that can be replaced by raw text
|
||||
# or discarded outright:
|
||||
s/\@copyright\{\}/(c)/g;
|
||||
s/\@dots\{\}/.../g;
|
||||
s/\@enddots\{\}/..../g;
|
||||
s/\@([.!? ])/$1/g;
|
||||
s/\@[:-]//g;
|
||||
s/\@bullet(?:\{\})?/*/g;
|
||||
s/\@TeX\{\}/TeX/g;
|
||||
s/\@pounds\{\}/\#/g;
|
||||
s/\@minus(?:\{\})?/-/g;
|
||||
s/\\,/,/g;
|
||||
|
||||
# Now the ones that have to be replaced by special escapes
|
||||
# (which will be turned back into text by unmunge())
|
||||
s/&/&/g;
|
||||
s/\@\{/{/g;
|
||||
s/\@\}/}/g;
|
||||
s/\@\@/&at;/g;
|
||||
|
||||
# Inside a verbatim block, handle @var specially.
|
||||
if ($shift ne "") {
|
||||
s/\@var\{([^\}]*)\}/<$1>/g;
|
||||
}
|
||||
|
||||
# POD doesn't interpret E<> inside a verbatim block.
|
||||
if ($shift eq "") {
|
||||
s/</</g;
|
||||
s/>/>/g;
|
||||
} else {
|
||||
s/</</g;
|
||||
s/>/>/g;
|
||||
}
|
||||
|
||||
# Single line command handlers.
|
||||
|
||||
/^\@include\s+(.+)$/ and do {
|
||||
push @instack, $inf;
|
||||
$inf = gensym();
|
||||
|
||||
# Try cwd and $ibase.
|
||||
open($inf, "<" . $1)
|
||||
or open($inf, "<" . $ibase . "/" . $1)
|
||||
or die "cannot open $1 or $ibase/$1: $!\n";
|
||||
next;
|
||||
};
|
||||
|
||||
/^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
|
||||
and $_ = "\n=head2 $1\n";
|
||||
/^\@subsection\s+(.+)$/
|
||||
and $_ = "\n=head3 $1\n";
|
||||
|
||||
# Block command handlers:
|
||||
/^\@itemize\s+(\@[a-z]+|\*|-)/ and do {
|
||||
push @endwstack, $endw;
|
||||
push @icstack, $ic;
|
||||
$ic = $1;
|
||||
$_ = "\n=over 4\n";
|
||||
$endw = "itemize";
|
||||
};
|
||||
|
||||
/^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do {
|
||||
push @endwstack, $endw;
|
||||
push @icstack, $ic;
|
||||
if (defined $1) {
|
||||
$ic = $1 . ".";
|
||||
} else {
|
||||
$ic = "1.";
|
||||
}
|
||||
$_ = "\n=over 4\n";
|
||||
$endw = "enumerate";
|
||||
};
|
||||
|
||||
/^\@([fv]?table)\s+(\@[a-z]+)/ and do {
|
||||
push @endwstack, $endw;
|
||||
push @icstack, $ic;
|
||||
$endw = $1;
|
||||
$ic = $2;
|
||||
$ic =~ s/\@(?:samp|strong|key|gcctabopt|env)/B/;
|
||||
$ic =~ s/\@(?:code|kbd)/C/;
|
||||
$ic =~ s/\@(?:dfn|var|emph|cite|i)/I/;
|
||||
$ic =~ s/\@(?:file)/F/;
|
||||
$_ = "\n=over 4\n";
|
||||
};
|
||||
|
||||
/^\@((?:small)?example|display)/ and do {
|
||||
push @endwstack, $endw;
|
||||
$endw = $1;
|
||||
$shift = "\t";
|
||||
$_ = ""; # need a paragraph break
|
||||
};
|
||||
|
||||
/^\@itemx?\s*(.+)?$/ and do {
|
||||
if (defined $1) {
|
||||
# Entity escapes prevent munging by the <> processing below.
|
||||
$_ = "\n=item $ic\<$1\>\n";
|
||||
} else {
|
||||
$_ = "\n=item $ic\n";
|
||||
$ic =~ y/A-Ya-y/B-Zb-z/;
|
||||
$ic =~ s/(\d+)/$1 + 1/eg;
|
||||
}
|
||||
};
|
||||
|
||||
$section .= $shift.$_."\n";
|
||||
}
|
||||
# End of current file.
|
||||
close($inf);
|
||||
$inf = pop @instack;
|
||||
}
|
||||
|
||||
die "No filename or title\n" unless defined $fn && defined $tl;
|
||||
|
||||
$sects{NAME} = "$fn \- $tl\n";
|
||||
$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
|
||||
|
||||
for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES
|
||||
BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
|
||||
if(exists $sects{$sect}) {
|
||||
$head = $sect;
|
||||
$head =~ s/SEEALSO/SEE ALSO/;
|
||||
print "=head1 $head\n\n";
|
||||
print scalar unmunge ($sects{$sect});
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub usage
|
||||
{
|
||||
die "usage: $0 [-D toggle...] [infile [outfile]]\n";
|
||||
}
|
||||
|
||||
sub postprocess
|
||||
{
|
||||
local $_ = $_[0];
|
||||
|
||||
# @value{foo} is replaced by whatever 'foo' is defined as.
|
||||
while (m/(\@value\{([a-zA-Z0-9_-]+)\})/g) {
|
||||
if (! exists $defs{$2}) {
|
||||
print STDERR "Option $2 not defined\n";
|
||||
s/\Q$1\E//;
|
||||
} else {
|
||||
$value = $defs{$2};
|
||||
s/\Q$1\E/$value/;
|
||||
}
|
||||
}
|
||||
|
||||
# Formatting commands.
|
||||
# Temporary escape for @r.
|
||||
s/\@r\{([^\}]*)\}/R<$1>/g;
|
||||
s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g;
|
||||
s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g;
|
||||
s/\@(?:gccoptlist|samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g;
|
||||
s/\@sc\{([^\}]*)\}/\U$1/g;
|
||||
s/\@file\{([^\}]*)\}/F<$1>/g;
|
||||
s/\@w\{([^\}]*)\}/S<$1>/g;
|
||||
s/\@(?:dmn|math)\{([^\}]*)\}/$1/g;
|
||||
|
||||
# Cross references are thrown away, as are @noindent and @refill.
|
||||
# (@noindent is impossible in .pod, and @refill is unnecessary.)
|
||||
# @* is also impossible in .pod; we discard it and any newline that
|
||||
# follows it. Similarly, our macro @gol must be discarded.
|
||||
|
||||
s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g;
|
||||
s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g;
|
||||
s/;\s+\@pxref\{(?:[^\}]*)\}//g;
|
||||
s/\@noindent\s*//g;
|
||||
s/\@refill//g;
|
||||
s/\@gol//g;
|
||||
s/\@\*\s*\n?//g;
|
||||
|
||||
# @uref can take one, two, or three arguments, with different
|
||||
# semantics each time. @url and @email are just like @uref with
|
||||
# one argument, for our purposes.
|
||||
s/\@(?:uref|url|email)\{([^\},]*)\}/<B<$1>>/g;
|
||||
s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g;
|
||||
s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g;
|
||||
|
||||
# Un-escape <> at this point.
|
||||
s/</</g;
|
||||
s/>/>/g;
|
||||
|
||||
# Now un-nest all B<>, I<>, R<>. Theoretically we could have
|
||||
# indefinitely deep nesting; in practice, one level suffices.
|
||||
1 while s/([BIR])<([^<>]*)([BIR])<([^<>]*)>/$1<$2>$3<$4>$1</g;
|
||||
|
||||
# Replace R<...> with bare ...; eliminate empty markup, B<>;
|
||||
# shift white space at the ends of [BI]<...> expressions outside
|
||||
# the expression.
|
||||
s/R<([^<>]*)>/$1/g;
|
||||
s/[BI]<>//g;
|
||||
s/([BI])<(\s+)([^>]+)>/$2$1<$3>/g;
|
||||
s/([BI])<([^>]+?)(\s+)>/$1<$2>$3/g;
|
||||
|
||||
# Extract footnotes. This has to be done after all other
|
||||
# processing because otherwise the regexp will choke on formatting
|
||||
# inside @footnote.
|
||||
while (/\@footnote/g) {
|
||||
s/\@footnote\{([^\}]+)\}/[$fnno]/;
|
||||
add_footnote($1, $fnno);
|
||||
$fnno++;
|
||||
}
|
||||
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub unmunge
|
||||
{
|
||||
# Replace escaped symbols with their equivalents.
|
||||
local $_ = $_[0];
|
||||
|
||||
s/</E<lt>/g;
|
||||
s/>/E<gt>/g;
|
||||
s/{/\{/g;
|
||||
s/}/\}/g;
|
||||
s/&at;/\@/g;
|
||||
s/&/&/g;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub add_footnote
|
||||
{
|
||||
unless (exists $sects{FOOTNOTES}) {
|
||||
$sects{FOOTNOTES} = "\n=over 4\n\n";
|
||||
}
|
||||
|
||||
$sects{FOOTNOTES} .= "=item $fnno.\n\n"; $fnno++;
|
||||
$sects{FOOTNOTES} .= $_[0];
|
||||
$sects{FOOTNOTES} .= "\n\n";
|
||||
}
|
||||
|
||||
# stolen from Symbol.pm
|
||||
{
|
||||
my $genseq = 0;
|
||||
sub gensym
|
||||
{
|
||||
my $name = "GEN" . $genseq++;
|
||||
my $ref = \*{$name};
|
||||
delete $::{$name};
|
||||
return $ref;
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,3 @@
|
||||
2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* texi2pod.pl: Correct handling of absolute @include.
|
||||
|
||||
2006-05-02 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* texi2pod.pl: Handle -I.
|
||||
|
||||
2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
|
||||
|
||||
* Makefile.in: Add install-html target. Add htmldir,
|
||||
docdir and datarootdir.
|
||||
* configure.texi: Document install-html target.
|
||||
* configure.in: AC_SUBST datarootdir, docdir, htmldir.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
|
||||
|
||||
* Makefile.in: TEXI2HTML uses makeinfo. Define
|
||||
|
||||
@@ -25,10 +25,7 @@ man6dir = $(mandir)/man6
|
||||
man7dir = $(mandir)/man7
|
||||
man8dir = $(mandir)/man8
|
||||
man9dir = $(mandir)/man9
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
infodir = @infodir@
|
||||
htmldir = @htmldir@
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
@@ -100,20 +97,6 @@ html:
|
||||
fi; \
|
||||
done
|
||||
|
||||
install-html: html
|
||||
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(htmldir)
|
||||
if test ! -f standards.html; then cd $(srcdir); fi; \
|
||||
if test -f standards.html; then \
|
||||
for i in standards.html*; do \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i; \
|
||||
done; \
|
||||
fi
|
||||
if test ! -f configure.html; then cd $(srcdir); fi; \
|
||||
if test -f configure.html; then \
|
||||
for i in configure.html*; do \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
dvi:
|
||||
for f in $(DVIFILES); do \
|
||||
|
||||
2302
etc/configure
vendored
2302
etc/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -4,9 +4,4 @@ AC_INIT(Makefile.in)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_SUBST(datarootdir)
|
||||
AC_SUBST(docdir)
|
||||
AC_SUBST(htmldir)
|
||||
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
|
||||
@@ -276,9 +276,7 @@ directory is controlled by @samp{configure} options, as described below.
|
||||
|
||||
In the Cygnus tree at present, the info files are built and installed as
|
||||
a separate step. To build them, run @samp{make info}. To install them,
|
||||
run @samp{make install-info}. The equivalent html files are also built
|
||||
and installed in a separate step. To build the html files, run
|
||||
@samp{make html}. To install the html files run @samp{make install-html}.
|
||||
run @samp{make install-info}.
|
||||
|
||||
All @samp{configure} scripts support a wide variety of options. The
|
||||
most interesting ones are @samp{--with} and @samp{--enable} options
|
||||
|
||||
@@ -36,7 +36,6 @@ $shift = "";
|
||||
$fnno = 1;
|
||||
$inf = "";
|
||||
$ibase = "";
|
||||
@ipath = ();
|
||||
|
||||
while ($_ = shift) {
|
||||
if (/^-D(.*)$/) {
|
||||
@@ -52,13 +51,6 @@ while ($_ = shift) {
|
||||
die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
|
||||
unless $flag =~ /^[a-zA-Z0-9_-]+$/;
|
||||
$defs{$flag} = $value;
|
||||
} elsif (/^-I(.*)$/) {
|
||||
if ($1 ne "") {
|
||||
$flag = $1;
|
||||
} else {
|
||||
$flag = shift;
|
||||
}
|
||||
push (@ipath, $flag);
|
||||
} elsif (/^-/) {
|
||||
usage();
|
||||
} else {
|
||||
@@ -237,14 +229,10 @@ while(<$inf>) {
|
||||
$inf = gensym();
|
||||
$file = postprocess($1);
|
||||
|
||||
# Try cwd and $ibase, then explicit -I paths.
|
||||
$done = 0;
|
||||
foreach $path ("", $ibase, @ipath) {
|
||||
$mypath = $file;
|
||||
$mypath = $path . "/" . $mypath if ($path ne "");
|
||||
open($inf, "<" . $mypath) and ($done = 1, last);
|
||||
}
|
||||
die "cannot find $file" if !$done;
|
||||
# Try cwd and $ibase.
|
||||
open($inf, "<" . $file)
|
||||
or open($inf, "<" . $ibase . "/" . $file)
|
||||
or die "cannot open $file or $ibase/$file: $!\n";
|
||||
next;
|
||||
};
|
||||
|
||||
|
||||
346
gettext.m4
Normal file
346
gettext.m4
Normal file
@@ -0,0 +1,346 @@
|
||||
# This file is derived from `gettext.m4'. The difference is that the
|
||||
# included macros assume Cygnus-style source and build trees.
|
||||
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 3
|
||||
|
||||
AC_DEFUN([CY_WITH_NLS],
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
AC_MSG_CHECKING([whether included gettext is requested])
|
||||
AC_ARG_WITH(included-gettext,
|
||||
[ --with-included-gettext use the GNU gettext library included here],
|
||||
nls_cv_force_use_gnu_gettext=$withval,
|
||||
nls_cv_force_use_gnu_gettext=no)
|
||||
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If gettext or catgets are available (in this order) we
|
||||
dnl use this. Else we have to fall back to GNU NLS library.
|
||||
dnl catgets is only used if permitted by option --with-catgets.
|
||||
nls_cv_header_intl=
|
||||
nls_cv_header_libgt=
|
||||
CATOBJEXT=
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
|
||||
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_gettext_libc" != "yes"; then
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CACHE_CHECK([for gettext in libintl],
|
||||
gt_cv_func_gettext_libintl,
|
||||
[AC_TRY_LINK([], [return (int) gettext ("")],
|
||||
gt_cv_func_gettext_libintl=yes,
|
||||
gt_cv_func_gettext_libintl=no)])])
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_gettext_libc" = "yes" \
|
||||
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETTEXT, 1,
|
||||
[Define as 1 if you have gettext and don't want to use GNU gettext.])
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||
if test "$MSGFMT" != "no"; then
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr],
|
||||
[CATOBJEXT=.gmo
|
||||
DATADIRNAME=share],
|
||||
[CATOBJEXT=.mo
|
||||
DATADIRNAME=lib])
|
||||
INSTOBJEXT=.mo
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl In the standard gettext, we would now check for catgets.
|
||||
dnl However, we never want to use catgets for our releases.
|
||||
|
||||
if test x"$CATOBJEXT" = x && test -d $srcdir/../intl; then
|
||||
# Neither gettext nor catgets in included in the C library.
|
||||
# Fall back on GNU gettext library (assuming it is present).
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions used to generate GNU NLS library.
|
||||
INTLOBJS="\$(GETTOBJS)"
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_SUBST(MSGFMT)
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
CATOBJEXT=.gmo
|
||||
INSTOBJEXT=.mo
|
||||
DATADIRNAME=share
|
||||
INTLDEPS='$(top_builddir)/../intl/libintl.a'
|
||||
INTLLIBS=$INTLDEPS
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
nls_cv_header_intl=libintl.h
|
||||
nls_cv_header_libgt=libgettext.h
|
||||
fi
|
||||
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext programs is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We need to process the po/ directory.
|
||||
POSUB=po
|
||||
else
|
||||
DATADIRNAME=share
|
||||
nls_cv_header_intl=libintl.h
|
||||
nls_cv_header_libgt=libgettext.h
|
||||
fi
|
||||
|
||||
# If this is used in GNU gettext we have to set USE_NLS to `yes'
|
||||
# because some of the sources are only built for this goal.
|
||||
if test "$PACKAGE" = gettext; then
|
||||
USE_NLS=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
fi
|
||||
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(DATADIRNAME)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INSTOBJEXT)
|
||||
AC_SUBST(INTLDEPS)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(INTLOBJS)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([CY_GNU_GETTEXT],
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
||||
unistd.h values.h sys/param.h])
|
||||
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
||||
__argz_count __argz_stringify __argz_next])
|
||||
|
||||
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
||||
AC_CHECK_FUNCS(stpcpy)
|
||||
fi
|
||||
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
||||
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
|
||||
fi
|
||||
|
||||
AM_LC_MESSAGES
|
||||
CY_WITH_NLS
|
||||
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||
case "$ALL_LINGUAS" in
|
||||
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
||||
esac
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl The reference to <locale.h> in the installed <libintl.h> file
|
||||
dnl must be resolved because we cannot expect the users of this
|
||||
dnl to define HAVE_LOCALE_H.
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
INCLUDE_LOCALE_H="#include <locale.h>"
|
||||
else
|
||||
INCLUDE_LOCALE_H="\
|
||||
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
||||
fi
|
||||
AC_SUBST(INCLUDE_LOCALE_H)
|
||||
|
||||
dnl Determine which catalog format we have (if any is needed)
|
||||
dnl For now we know about two different formats:
|
||||
dnl Linux libc-5 and the normal X/Open format
|
||||
if test -f $srcdir/po2tbl.sed.in; then
|
||||
if test "$CATOBJEXT" = ".cat"; then
|
||||
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
||||
|
||||
dnl Transform the SED scripts while copying because some dumb SEDs
|
||||
dnl cannot handle comments.
|
||||
sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
|
||||
fi
|
||||
dnl po2tbl.sed is always needed.
|
||||
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
||||
$srcdir/po2tbl.sed.in > po2tbl.sed
|
||||
fi
|
||||
|
||||
dnl In the intl/Makefile.in we have a special dependency which makes
|
||||
dnl only sense for gettext. We comment this out for non-gettext
|
||||
dnl packages.
|
||||
if test "$PACKAGE" = "gettext"; then
|
||||
GT_NO="#NO#"
|
||||
GT_YES=
|
||||
else
|
||||
GT_NO=
|
||||
GT_YES="#YES#"
|
||||
fi
|
||||
AC_SUBST(GT_NO)
|
||||
AC_SUBST(GT_YES)
|
||||
|
||||
MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
dnl *** For now the libtool support in intl/Makefile is not for real.
|
||||
l=
|
||||
AC_SUBST(l)
|
||||
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po/Makefile. But only do this if the po directory
|
||||
dnl exists in srcdir and contains POTFILES.in.
|
||||
if test -f $srcdir/po/POTFILES.in; then
|
||||
test -d po || mkdir po
|
||||
if test "x$srcdir" != "x."; then
|
||||
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||
posrcprefix="$srcdir/"
|
||||
else
|
||||
posrcprefix="../$srcdir/"
|
||||
fi
|
||||
else
|
||||
posrcprefix="../"
|
||||
fi
|
||||
rm -f po/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||
fi
|
||||
])
|
||||
|
||||
# Search path for a program which passes the given test.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
#
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
||||
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
|
||||
[# Extract the first word of "$2", so it can be a program name with args.
|
||||
set dummy $2; ac_word=[$]2
|
||||
AC_MSG_CHECKING([for $ac_word])
|
||||
AC_CACHE_VAL(ac_cv_path_$1,
|
||||
[case "[$]$1" in
|
||||
/*)
|
||||
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
if [$3]; then
|
||||
ac_cv_path_$1="$ac_dir/$ac_word"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
dnl If no 4th arg is given, leave the cache variable unset,
|
||||
dnl so AC_PATH_PROGS will keep looking.
|
||||
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
||||
])dnl
|
||||
;;
|
||||
esac])dnl
|
||||
$1="$ac_cv_path_$1"
|
||||
if test -n "[$]$1"; then
|
||||
AC_MSG_RESULT([$]$1)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_SUBST($1)dnl
|
||||
])
|
||||
|
||||
# Check whether LC_MESSAGES is available in <locale.h>.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN([AM_LC_MESSAGES],
|
||||
[if test $ac_cv_header_locale_h = yes; then
|
||||
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
||||
if test $am_cv_val_LC_MESSAGES = yes; then
|
||||
AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
||||
[Define if your locale.h file contains LC_MESSAGES.])
|
||||
fi
|
||||
fi])
|
||||
340
include/COPYING
340
include/COPYING
@@ -1,340 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
@@ -1,593 +0,0 @@
|
||||
2006-07-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* bfdlink.h (struct bfd_link_info): Add emit_hash and
|
||||
emit_gnu_hash bitfields.
|
||||
|
||||
2006-04-11 Jim Blandy <jimb@codesourcery.com>
|
||||
|
||||
* libiberty.h (pex_input_file, pex_input_pipe): New declarations.
|
||||
|
||||
2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* bfdlink.h (bfd_link_info): Replace need_relax_finalize with
|
||||
relax_pass.
|
||||
|
||||
2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
|
||||
|
||||
* elf/bfin.h (R_BFIN_GOT17M4, R_BFIN_GOTHI, R_BFIN_GOTLO,
|
||||
R_BFIN_FUNCDESC, R_BFIN_FUNCDESC_GOT17M4, R_BFIN_FUNCDESC_GOTHI,
|
||||
R_BFIN_FUNCDESC_GOTLO, R_BFIN_FUNCDESC_VALUE,
|
||||
R_BFIN_FUNCDESC_GOTOFF17M4, R_BFIN_FUNCDESC_GOTOFFHI,
|
||||
R_BFIN_FUNCDESC_GOTOFFLO, R_BFIN_GOTOFF17M4, R_BFIN_GOTOFFHI,
|
||||
R_BFIN_GOTOFFLO): New relocs.
|
||||
(EF_BFIN_PIC, EF_BFIN_FDPIC, EF_BFIN_PIC_FLAGS): New macros.
|
||||
|
||||
2006-03-23 Michael Matz <matz@suse.de>
|
||||
|
||||
* elf/x86-64.h: Add the new relocations with their official
|
||||
numbers.
|
||||
|
||||
2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
|
||||
Anil Paranjape <anilp1@kpitcummins.com>
|
||||
Shilin Shakti <shilins@kpitcummins.com>
|
||||
|
||||
* dis-asm.h (print_insn_xc16c): New prototype.
|
||||
|
||||
2006-02-06 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
* elf/ia64.h (SHF_IA_64_HP_TLS): New.
|
||||
|
||||
2006-01-18 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* md5.h: Include ansidecl.h
|
||||
|
||||
2006-01-17 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
PR binutils/1486
|
||||
* dis-asm.h (struct disassemble_info): Add
|
||||
disassembler_needs_relocs.
|
||||
|
||||
2006-01-09 Bob Wilson <bob.wilson@acm.org>
|
||||
|
||||
* xtensa-config.h (XCHAL_HAVE_MUL32_HIGH): Define.
|
||||
|
||||
2005-12-30 Bob Wilson <bob.wilson@acm.org>
|
||||
|
||||
* xtensa-config.h (XCHAL_HAVE_WIDE_BRANCHES): New.
|
||||
|
||||
2005-12-16 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
Second part of ms1 to mt renaming.
|
||||
* dis-asm.h (print_insn_mt): Renamed.
|
||||
|
||||
2005-12-12 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* elf/mt.h: Renamed from ms1.h
|
||||
|
||||
2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
|
||||
|
||||
PR java/9861
|
||||
* demangle.h : Add DMGL_RET_POSTFIX define to enable alternative
|
||||
output format for return types
|
||||
|
||||
2005-11-07 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
Add ms2.
|
||||
* elf/ms1.h (EF_MS1_CPU_MS2): New.
|
||||
|
||||
2005-11-06 John David Anglin <dave.anglin@nrc-crnc.gc.ca>
|
||||
|
||||
* elf/hppa.h (R_PARISC_DIR64WR, R_PARISC_DIR64DR): Remove relocs.
|
||||
|
||||
2005-11-03 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* bfdlink.h (struct bfd_link_order): Tweak comment.
|
||||
|
||||
2005-10-31 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* floatformat.h (enum floatformat_byteorders): Add
|
||||
floatformat_vax.
|
||||
(floatformat_vax_aingle, floatformat_vax_double): Declare.
|
||||
|
||||
2005-10-28 Dave Brolley <brolley@redhat.com>
|
||||
|
||||
Contribute the following changes:
|
||||
2003-09-29 Dave Brolley <brolley@redhat.com>
|
||||
|
||||
* dis-asm.h (disassemble_info): insn_sets now (void *) to allow for
|
||||
more exotic underlying types to be used.
|
||||
|
||||
2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
|
||||
|
||||
disasm.h: Add declaration for print_insn_z80
|
||||
|
||||
2005-09-30 Catherine Moore <clm@cm00re.com>
|
||||
|
||||
* dis-asm.h (print_insn_bfin): Declare.
|
||||
* opcode/bfin.h: New file.
|
||||
|
||||
2005-09-26 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* libiberty.h (expandargv): New function.
|
||||
|
||||
2005-08-18 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* bfdlink.h: Remove mention of a29k.
|
||||
* dis-asm.h: Remove a29k support.
|
||||
* aout/encap.h: Likewise.
|
||||
|
||||
2005-08-17 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* floatformat.h (struct floatformat): Change type of large
|
||||
argument for is_valid member to `const void *'.
|
||||
(floatformat_to_double): Change type of second argument to `const
|
||||
void *'.
|
||||
(floatformat_from_double): Change type of last argument to `void
|
||||
*'.
|
||||
(floatformat_is_valid): Change type of last argument to `const
|
||||
void *'.
|
||||
|
||||
2005-07-14 Jim Blandy <jimb@redhat.com>
|
||||
|
||||
* dis-asm.h (print_insn_m32c): New declaration.
|
||||
|
||||
2005-07-12 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* xregex2.h (regexec): Qualify this prototype with __extension__
|
||||
when compiling with GNU C.
|
||||
|
||||
2005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* dis-asm.h (fprintf_ftype): Add format attribute.
|
||||
|
||||
2005-07-03 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
PR other/13906
|
||||
* ansidecl.h (ATTRIBUTE_ALIGNED_ALIGNOF): New.
|
||||
* md5.h (md5_uintptr): New.
|
||||
(md5_ctx): Align buffer field.
|
||||
|
||||
2005-06-30 Daniel Berlin <dberlin@dberlin.org>
|
||||
|
||||
* hashtab.h (HTAB_DELETED_ENTRY): New macro.
|
||||
(HTAB_EMPTY_ENTRY): New macro.
|
||||
|
||||
2005-06-20 Geoffrey Keating <geoffk@apple.com>
|
||||
|
||||
* libiberty.h (strverscmp): Prototype.
|
||||
|
||||
2005-06-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* elf/external.h (GRP_ENTRY_SIZE): Define.
|
||||
|
||||
2005-06-08 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* dis-asm.h (get_arm_regnames): Update prototype.
|
||||
|
||||
2005-06-07 Aldy Hernandez <aldyh@redhat.com>
|
||||
Michael Snyder <msnyder@redhat.com>
|
||||
Stan Cox <scox@redhat.com>
|
||||
|
||||
* dis-asm.h: Externalize print_insn_ms1.
|
||||
|
||||
2005-06-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||
|
||||
* libiberty.h (XOBFINISH): New.
|
||||
|
||||
2005-06-03 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* bfdlink.h (struct bfd_link_callbacks): Add einfo.
|
||||
|
||||
2005-06-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* libiberty.h (vsnprintf): Add format attribute.
|
||||
|
||||
2005-05-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* ansidecl.h: Add ATTRIBUTE_FPTR_PRINTF.
|
||||
|
||||
2005-05-28 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* libiberty.h: (snprintf) [!HAVE_DECL_SNPRINTF]: Declare if
|
||||
needed.
|
||||
(vsnprintf) [!HAVE_DECL_VSNPRINTF]: Declare if needed.
|
||||
|
||||
2005-05-25 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* demangle.h (DEMANGLE_COMPONENT_HIDDEN_ALIAS): New.
|
||||
|
||||
2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||
|
||||
* libiberty.h (ACONCAT): Properly cast value of alloca().
|
||||
|
||||
* ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if
|
||||
__cplusplus.
|
||||
|
||||
2005-05-12 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
libiberty.h: Do not define empty basename prototype.
|
||||
|
||||
2005-05-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* Update the address and phone number of the FSF organization in
|
||||
the GPL notices in the following files:
|
||||
COPYING, ansidecl.h, bfdlink.h, bout.h, demangle.h, dis-asm.h,
|
||||
dyn-string.h, fibheap.h, filenames.h, floatformat.h,
|
||||
fnmatch.h, gdbm.h, getopt.h, hashtab.h, hp-symtab.h, ieee.h,
|
||||
libiberty.h, md5.h, oasys.h, objalloc.h, obstack.h, os9k.h,
|
||||
partition.h, progress.h, safe-ctype.h, sort.h, splay-tree.h,
|
||||
symcat.h, ternary.h, xregex2.h, xtensa-config.h,
|
||||
xtensa-isa-internal.h, xtensa-isa.h
|
||||
|
||||
2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* libiberty.h (unlock_std_streams): New.
|
||||
|
||||
2005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* hashtab.h, libiberty.h, objalloc.h, splay-tree.h, ternary.h:
|
||||
Don't use the PTR macro.
|
||||
|
||||
* sort.h: Don't use the PARAMS macro.
|
||||
|
||||
2005-04-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* libiberty.h (unlock_stream): New.
|
||||
|
||||
2005-04-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
|
||||
Remove parameter names.
|
||||
|
||||
2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
|
||||
Provide prototypes for new functions.
|
||||
|
||||
2005-03-29 Ian Lance Taylor <ian@airs.com>
|
||||
|
||||
* libiberty.h: Fix indentation.
|
||||
|
||||
2005-03-28 Ian Lance Taylor <ian@airs.com>
|
||||
|
||||
* libiberty.h: Include <stdio.h>.
|
||||
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
|
||||
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
|
||||
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
|
||||
(pex_init, pex_run, pex_read_output): Declare.
|
||||
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
|
||||
(struct pex_time): Define.
|
||||
|
||||
2005-03-28 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* libiberty.h (ffs): Declare, if necessary.
|
||||
|
||||
2005-03-27 Gabriel Dos Reis <gdr@integreable-solutions.net>
|
||||
|
||||
* ternary.h: Don't use PARAMS anymore.
|
||||
|
||||
2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||
|
||||
* md5.h: Remove definition and uses of __P.
|
||||
* dyn-string.h: Remove uses of PARAMS.
|
||||
* fibheap.h: Likewise.
|
||||
* floatformat.h: Likewise.
|
||||
* hashtab.h: Likewise.
|
||||
|
||||
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||
|
||||
* demangle.h: Remove uses of PARAMS.
|
||||
|
||||
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
|
||||
ANSI_PROTOTYPES is always assumed.
|
||||
Remove uses of PARAMS throughout.
|
||||
|
||||
2005-03-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* libiberty.h (xstrndup): Declare.
|
||||
|
||||
2005-03-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC.
|
||||
|
||||
2005-03-22 Bob Wilson <bob.wilson@acm.org>
|
||||
|
||||
* xtensa-isa.h: Update a comment and whitespace.
|
||||
|
||||
2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* bfdlink.h (bfd_link_info): Add gc_sections.
|
||||
|
||||
2005-03-09 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* libiberty.h (gettimeofday): Declare.
|
||||
|
||||
2005-03-01 Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
* libiberty.h: Declare unlink_if_ordinary.
|
||||
|
||||
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* xtensa-isa-internal.h (xtensa_length_decode_fn): Warning fix.
|
||||
* xtensa-isa.h (xtensa_insnbuf_to_chars): Likewise.
|
||||
(xtensa_insnbuf_from_chars, xtensa_isa_length_from_chars): Likewise.
|
||||
|
||||
2005-02-14 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR bootstrap/19818
|
||||
* ansidecl.h (PARAMS): Guard from redefinition.
|
||||
|
||||
2005-02-03 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* bfdlink.h (struct bfd_link_hash_entry): Add u.undef.weak.
|
||||
|
||||
2005-02-01 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* bfdlink.h (bfd_link_repair_undef_list): Declare.
|
||||
|
||||
2005-01-10 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* dis-asm.h (struct disassemble_info): Add skip_zeroes and
|
||||
skip_zeroes_at_end.
|
||||
|
||||
2004-12-11 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* fibheap.h (struct fibnode): Only use unsigned long bitfields
|
||||
when __GNUC__ is defined and ints are less than 32-bits wide.
|
||||
|
||||
2004-11-04 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* bfdlink.h (bfd_link_info): Add default_imported_symver.
|
||||
|
||||
2004-11-12 Bob Wilson <bob.wilson@acm.org>
|
||||
|
||||
* xtensa-isa-internal.h (xtensa_interface_internal): Add class_id.
|
||||
* xtensa-isa.h (xtensa_interface_class_id): New prototype.
|
||||
|
||||
2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
|
||||
Vineet Sharma <vineets@noida.hcltech.com>
|
||||
|
||||
* dis-asm.h: Add prototype for print_insn_maxq_little.
|
||||
|
||||
2004-10-26 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* bfdlink.h (struct bfd_link_info): Add create_default_symver.
|
||||
|
||||
2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR 463
|
||||
* bfdlink.h (bfd_link_callbacks): Add a pointer to struct
|
||||
bfd_link_hash_entry to reloc_overflow.
|
||||
|
||||
2004-10-07 Bob Wilson <bob.wilson@acm.org>
|
||||
|
||||
* xtensa-config.h (XSHAL_USE_ABSOLUTE_LITERALS,
|
||||
XCHAL_HAVE_PREDICTED_BRANCHES, XCHAL_INST_FETCH_WIDTH): New.
|
||||
(XCHAL_EXTRA_SA_SIZE, XCHAL_EXTRA_SA_ALIGN): Delete.
|
||||
|
||||
* xtensa-isa-internal.h (ISA_INTERFACE_VERSION): Delete.
|
||||
(config_sturct struct): Delete.
|
||||
(XTENSA_OPERAND_IS_REGISTER, XTENSA_OPERAND_IS_PCRELATIVE,
|
||||
XTENSA_OPERAND_IS_INVISIBLE, XTENSA_OPERAND_IS_UNKNOWN,
|
||||
XTENSA_OPCODE_IS_BRANCH, XTENSA_OPCODE_IS_JUMP,
|
||||
XTENSA_OPCODE_IS_LOOP, XTENSA_OPCODE_IS_CALL,
|
||||
XTENSA_STATE_IS_EXPORTED, XTENSA_INTERFACE_HAS_SIDE_EFFECT): Define.
|
||||
(xtensa_format_encode_fn, xtensa_get_slot_fn, xtensa_set_slot_fn): New.
|
||||
(xtensa_insn_decode_fn): Rename to ...
|
||||
(xtensa_opcode_decode_fn): ... this.
|
||||
(xtensa_immed_decode_fn, xtensa_immed_encode_fn, xtensa_do_reloc_fn,
|
||||
xtensa_undo_reloc_fn): Update.
|
||||
(xtensa_encoding_template_fn): Delete.
|
||||
(xtensa_opcode_encode_fn, xtensa_format_decode_fn,
|
||||
xtensa_length_decode_fn): New.
|
||||
(xtensa_format_internal, xtensa_slot_internal): New types.
|
||||
(xtensa_operand_internal): Delete operand_kind, inout, isPCRelative,
|
||||
get_field, and set_field fields. Add name, field_id, regfile,
|
||||
num_regs, and flags fields.
|
||||
(xtensa_arg_internal): New type.
|
||||
(xtensa_iclass_internal): Change operands field to array of
|
||||
xtensa_arg_internal. Add num_stateOperands, stateOperands,
|
||||
num_interfaceOperands, and interfaceOperands fields.
|
||||
(xtensa_opcode_internal): Delete length, template, and iclass fields.
|
||||
Add iclass_id, flags, encode_fns, num_funcUnit_uses, and funcUnit_uses.
|
||||
(opname_lookup_entry): Delete.
|
||||
(xtensa_regfile_internal, xtensa_interface_internal,
|
||||
xtensa_funcUnit_internal, xtensa_state_internal,
|
||||
xtensa_sysreg_internal, xtensa_lookup_entry): New.
|
||||
(xtensa_isa_internal): Replace opcode_table field with opcodes field.
|
||||
Change type of opname_lookup_table. Delete num_modules,
|
||||
module_opcode_base, module_decode_fn, config, and has_density fields.
|
||||
Add num_formats, formats, format_decode_fn, length_decode_fn,
|
||||
num_slots, slots, num_fields, num_operands, operands, num_iclasses,
|
||||
iclasses, num_regfiles, regfiles, num_states, states,
|
||||
state_lookup_table, num_sysregs, sysregs, sysreg_lookup_table,
|
||||
max_sysreg_num, sysreg_table, num_interfaces, interfaces,
|
||||
interface_lookup_table, num_funcUnits, funcUnits and
|
||||
funcUnit_lookup_table fields.
|
||||
(xtensa_isa_module, xtensa_isa_modules): Delete.
|
||||
(xtensa_isa_name_compare): New prototype.
|
||||
(xtisa_errno, xtisa_error_msg): New.
|
||||
* xtensa-isa.h (XTENSA_ISA_VERSION): Define.
|
||||
(xtensa_isa): Change type.
|
||||
(xtensa_operand): Delete.
|
||||
(xtensa_format, xtensa_regfile, xtensa_state, xtensa_sysreg,
|
||||
xtensa_interface, xtensa_funcUnit, xtensa_isa_status,
|
||||
xtensa_funcUnit_use): New types.
|
||||
(libisa_module_specifier): Delete.
|
||||
(xtensa_isa_errno, xtensa_isa_error_msg): New prototypes.
|
||||
(xtensa_insnbuf_free, xtensa_insnbuf_to_chars,
|
||||
xtensa_insnbuf_from_chars): Update prototypes.
|
||||
(xtensa_load_isa, xtensa_extend_isa, xtensa_default_isa,
|
||||
xtensa_insn_maxlength, xtensa_num_opcodes, xtensa_decode_insn,
|
||||
xtensa_encode_insn, xtensa_insn_length,
|
||||
xtensa_insn_length_from_first_byte, xtensa_num_operands,
|
||||
xtensa_operand_kind, xtensa_encode_result,
|
||||
xtensa_operand_isPCRelative): Delete.
|
||||
(xtensa_isa_init, xtensa_operand_inout, xtensa_operand_get_field,
|
||||
xtensa_operand_set_field, xtensa_operand_encode,
|
||||
xtensa_operand_decode, xtensa_operand_do_reloc,
|
||||
xtensa_operand_undo_reloc): Update prototypes.
|
||||
(xtensa_isa_maxlength, xtensa_isa_length_from_chars,
|
||||
xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
|
||||
xtensa_isa_num_opcodes, xtensa_isa_num_regfiles, xtensa_isa_num_states,
|
||||
xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
|
||||
xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
|
||||
xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
|
||||
xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
|
||||
xtensa_format_get_slot, xtensa_format_set_slot, xtensa_opcode_decode,
|
||||
xtensa_opcode_encode, xtensa_opcode_is_branch, xtensa_opcode_is_jump,
|
||||
xtensa_opcode_is_loop, xtensa_opcode_is_call,
|
||||
xtensa_opcode_num_operands, xtensa_opcode_num_stateOperands,
|
||||
xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
|
||||
xtensa_opcode_funcUnit_use, xtensa_operand_name,
|
||||
xtensa_operand_is_visible, xtensa_operand_is_register,
|
||||
xtensa_operand_regfile, xtensa_operand_num_regs,
|
||||
xtensa_operand_is_known_reg, xtensa_operand_is_PCrelative,
|
||||
xtensa_stateOperand_state, xtensa_stateOperand_inout,
|
||||
xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
|
||||
xtensa_regfile_lookup_shortname, xtensa_regfile_name,
|
||||
xtensa_regfile_shortname, xtensa_regfile_view_parent,
|
||||
xtensa_regfile_num_bits, xtensa_regfile_num_entries,
|
||||
xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
|
||||
xtensa_state_is_exported, xtensa_sysreg_lookup,
|
||||
xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
|
||||
xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
|
||||
xtensa_interface_num_bits, xtensa_interface_inout,
|
||||
xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
|
||||
xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New prototypes.
|
||||
2004-10-07 Jeff Baker <jbaker@qnx.com>
|
||||
|
||||
* bfdlink.h (bfd_link_info): Add bitfield: warn_shared_textrel.
|
||||
|
||||
2004-09-17 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* bfdlink.h (struct bfd_link_hash_entry): Move und_next into elements
|
||||
of union.
|
||||
|
||||
2004-09-13 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
|
||||
|
||||
* libiberty.h (basename): Prototype for __MINGW32__.
|
||||
|
||||
2004-09-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* ansidecl.h (ATTRIBUTE_SENTINEL): Define.
|
||||
* libiberty.h (concat, reconcat, concat_length, concat_copy,
|
||||
concat_copy2): Use ATTRIBUTE_SENTINEL.
|
||||
|
||||
2004-08-13 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* bfdlink.h (struct bfd_link_callbacks): Remove "error_handler".
|
||||
(LD_DEFINITION_IN_DISCARDED_SECTION): Delete.
|
||||
|
||||
2004-08-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||
|
||||
* libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any
|
||||
const-qualification before disposal.
|
||||
|
||||
2004-07-24 Bernardo Innocenti <bernie@develer.com>
|
||||
|
||||
* ansidecl.h (ARG_UNUSED): New Macro.
|
||||
|
||||
2004-07-23 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* bin-bugs.h (REPORT_BUGS_TO): Set to
|
||||
"<URL:http://www.sourceware.org/bugzilla/>".
|
||||
|
||||
2004-07-21 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* ansidecl.h (ATTRIBUTE_PURE): New.
|
||||
|
||||
2004-07-13 Bernardo Innocenti <bernie@develer.com>
|
||||
|
||||
* libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from
|
||||
libcpp/internal.h.
|
||||
(XDELETE, XRESIZEVEC, XDELETEVEC, XNEWVAR, XCNEWVAR, XRESIZEVAR): New
|
||||
macros.
|
||||
|
||||
2004-07-13 Bernardo Innocenti <bernie@develer.com>
|
||||
|
||||
* libiberty.h (ASTRDUP): Add casts required for stricter
|
||||
type conversion rules of C++.
|
||||
* obstack.h (obstack_free): Likewise.
|
||||
|
||||
2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
|
||||
|
||||
* dis-asm.h (print_insn_crx): Declare.
|
||||
|
||||
2004-06-24 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* bfdlink.h (struct bfd_link_order): Update comment.
|
||||
|
||||
2004-05-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* bfdlink.h (struct bfd_link_info): Add relro, relro_start and
|
||||
relro_end fields.
|
||||
|
||||
2004-05-04 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* demangle.h: Do not use C++ reserved keyword typename as
|
||||
parameter for cplus_demangle_fill_builtin_type.
|
||||
|
||||
2004-04-22 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* hashtab.h (struct htab): Add size_prime_index.
|
||||
|
||||
2004-04-13 Jeff Law <law@redhat.com>
|
||||
|
||||
* hashtab.h (htab_remove_elt_with_hash): Prototype new function.
|
||||
|
||||
2004-03-30 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* hashtab.h, splay-tree.h: Use new shorter form of GTY markers.
|
||||
|
||||
2004-03-25 Stan Shebs <shebs@apple.com>
|
||||
|
||||
* mpw/: Remove subdirectory and everything in it.
|
||||
|
||||
2004-03-23 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 51.
|
||||
* bfdlink.h (struct bfd_link_info): Add wrap_char.
|
||||
|
||||
2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* bfdlink.h (bfd_link_info): Correct comments for the
|
||||
unresolved_syms_in_objects field.
|
||||
|
||||
2004-02-24 Ian Lance Taylor <ian@wasabisystems.com>
|
||||
|
||||
* dyn-string.h: Update copyright date.
|
||||
|
||||
2004-02-23 Ian Lance Taylor <ian@wasabisystems.com>
|
||||
|
||||
* dyn-string.h: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and
|
||||
the associated #defines.
|
||||
|
||||
2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
|
||||
|
||||
* demangle.h: Instead of checking ANSI_PROTOTYPES, just include
|
||||
"libiberty.h".
|
||||
|
||||
* demangle.h: If ANSI_PROTOTYPES is defined, include <stddef.h>.
|
||||
|
||||
* demangle.h (enum demangle_component_type): Define.
|
||||
(struct demangle_operator_info): Declare.
|
||||
(struct demangle_builtin_type_info): Declare.
|
||||
(struct demangle_component): Define.
|
||||
(cplus_demangle_fill_component): Declare.
|
||||
(cplus_demangle_fill_name): Declare.
|
||||
(cplus_demangle_fill_builtin_type): Declare.
|
||||
(cplus_demangle_fill_operator): Declare.
|
||||
(cplus_demangle_fill_extended_operator): Declare.
|
||||
(cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare.
|
||||
(cplus_demangle_v3_components): Declare.
|
||||
(cplus_demangle_print): Declare.
|
||||
|
||||
For older changes see ChangeLog-9103
|
||||
|
||||
Local Variables:
|
||||
mode: change-log
|
||||
left-margin: 8
|
||||
fill-column: 74
|
||||
version-control: never
|
||||
End:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
See ../binutils/MAINTAINERS
|
||||
@@ -1,24 +0,0 @@
|
||||
#include "config.h"
|
||||
|
||||
#if defined(__GNUC__) && !defined(C_ALLOCA)
|
||||
# ifndef alloca
|
||||
# define alloca __builtin_alloca
|
||||
# endif
|
||||
#else /* ! defined (__GNUC__) */
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
# else
|
||||
# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
|
||||
# include <alloca.h>
|
||||
# else /* ! defined (HAVE_ALLOCA_H) */
|
||||
# ifdef __STDC__
|
||||
extern PTR alloca (size_t);
|
||||
# else /* ! defined (__STDC__) */
|
||||
extern PTR alloca ();
|
||||
# endif /* ! defined (__STDC__) */
|
||||
# endif /* ! defined (HAVE_ALLOCA_H) */
|
||||
# ifdef _WIN32
|
||||
# include <malloc.h>
|
||||
# endif
|
||||
# endif /* ! defined (_AIX) */
|
||||
#endif /* ! defined (__GNUC__) */
|
||||
@@ -1,371 +0,0 @@
|
||||
/* ANSI and traditional C compatability macros
|
||||
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* ANSI and traditional C compatibility macros
|
||||
|
||||
ANSI C is assumed if __STDC__ is #defined.
|
||||
|
||||
Macro ANSI C definition Traditional C definition
|
||||
----- ---- - ---------- ----------- - ----------
|
||||
ANSI_PROTOTYPES 1 not defined
|
||||
PTR `void *' `char *'
|
||||
PTRCONST `void *const' `char *'
|
||||
LONG_DOUBLE `long double' `double'
|
||||
const not defined `'
|
||||
volatile not defined `'
|
||||
signed not defined `'
|
||||
VA_START(ap, var) va_start(ap, var) va_start(ap)
|
||||
|
||||
Note that it is safe to write "void foo();" indicating a function
|
||||
with no return value, in all K+R compilers we have been able to test.
|
||||
|
||||
For declaring functions with prototypes, we also provide these:
|
||||
|
||||
PARAMS ((prototype))
|
||||
-- for functions which take a fixed number of arguments. Use this
|
||||
when declaring the function. When defining the function, write a
|
||||
K+R style argument list. For example:
|
||||
|
||||
char *strcpy PARAMS ((char *dest, char *source));
|
||||
...
|
||||
char *
|
||||
strcpy (dest, source)
|
||||
char *dest;
|
||||
char *source;
|
||||
{ ... }
|
||||
|
||||
|
||||
VPARAMS ((prototype, ...))
|
||||
-- for functions which take a variable number of arguments. Use
|
||||
PARAMS to declare the function, VPARAMS to define it. For example:
|
||||
|
||||
int printf PARAMS ((const char *format, ...));
|
||||
...
|
||||
int
|
||||
printf VPARAMS ((const char *format, ...))
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
For writing functions which take variable numbers of arguments, we
|
||||
also provide the VA_OPEN, VA_CLOSE, and VA_FIXEDARG macros. These
|
||||
hide the differences between K+R <varargs.h> and C89 <stdarg.h> more
|
||||
thoroughly than the simple VA_START() macro mentioned above.
|
||||
|
||||
VA_OPEN and VA_CLOSE are used *instead of* va_start and va_end.
|
||||
Immediately after VA_OPEN, put a sequence of VA_FIXEDARG calls
|
||||
corresponding to the list of fixed arguments. Then use va_arg
|
||||
normally to get the variable arguments, or pass your va_list object
|
||||
around. You do not declare the va_list yourself; VA_OPEN does it
|
||||
for you.
|
||||
|
||||
Here is a complete example:
|
||||
|
||||
int
|
||||
printf VPARAMS ((const char *format, ...))
|
||||
{
|
||||
int result;
|
||||
|
||||
VA_OPEN (ap, format);
|
||||
VA_FIXEDARG (ap, const char *, format);
|
||||
|
||||
result = vfprintf (stdout, format, ap);
|
||||
VA_CLOSE (ap);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
You can declare variables either before or after the VA_OPEN,
|
||||
VA_FIXEDARG sequence. Also, VA_OPEN and VA_CLOSE are the beginning
|
||||
and end of a block. They must appear at the same nesting level,
|
||||
and any variables declared after VA_OPEN go out of scope at
|
||||
VA_CLOSE. Unfortunately, with a K+R compiler, that includes the
|
||||
argument list. You can have multiple instances of VA_OPEN/VA_CLOSE
|
||||
pairs in a single function in case you need to traverse the
|
||||
argument list more than once.
|
||||
|
||||
For ease of writing code which uses GCC extensions but needs to be
|
||||
portable to other compilers, we provide the GCC_VERSION macro that
|
||||
simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
|
||||
wrappers around __attribute__. Also, __extension__ will be #defined
|
||||
to nothing if it doesn't work. See below.
|
||||
|
||||
This header also defines a lot of obsolete macros:
|
||||
CONST, VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID,
|
||||
AND, DOTS, NOARGS. Don't use them. */
|
||||
|
||||
#ifndef _ANSIDECL_H
|
||||
#define _ANSIDECL_H 1
|
||||
|
||||
/* Every source file includes this file,
|
||||
so they will all get the switch for lint. */
|
||||
/* LINTLIBRARY */
|
||||
|
||||
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
|
||||
older preprocessors. Thus we can't define something like this:
|
||||
|
||||
#define HAVE_GCC_VERSION(MAJOR, MINOR) \
|
||||
(__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
|
||||
|
||||
and then test "#if HAVE_GCC_VERSION(2,7)".
|
||||
|
||||
So instead we use the macro below and test it against specific values. */
|
||||
|
||||
/* This macro simplifies testing whether we are using gcc, and if it
|
||||
is of a particular minimum version. (Both major & minor numbers are
|
||||
significant.) This macro will evaluate to 0 if we are not using
|
||||
gcc at all. */
|
||||
#ifndef GCC_VERSION
|
||||
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||
#endif /* GCC_VERSION */
|
||||
|
||||
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) || (defined(__alpha) && defined(__cplusplus))
|
||||
/* All known AIX compilers implement these things (but don't always
|
||||
define __STDC__). The RISC/OS MIPS compiler defines these things
|
||||
in SVR4 mode, but does not define __STDC__. */
|
||||
/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
|
||||
C++ compilers, does not define __STDC__, though it acts as if this
|
||||
was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
|
||||
|
||||
#define ANSI_PROTOTYPES 1
|
||||
#define PTR void *
|
||||
#define PTRCONST void *const
|
||||
#define LONG_DOUBLE long double
|
||||
|
||||
/* PARAMS is often defined elsewhere (e.g. by libintl.h), so wrap it in
|
||||
a #ifndef. */
|
||||
#ifndef PARAMS
|
||||
#define PARAMS(ARGS) ARGS
|
||||
#endif
|
||||
|
||||
#define VPARAMS(ARGS) ARGS
|
||||
#define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR)
|
||||
|
||||
/* variadic function helper macros */
|
||||
/* "struct Qdmy" swallows the semicolon after VA_OPEN/VA_FIXEDARG's
|
||||
use without inhibiting further decls and without declaring an
|
||||
actual variable. */
|
||||
#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP, VAR); { struct Qdmy
|
||||
#define VA_CLOSE(AP) } va_end(AP); }
|
||||
#define VA_FIXEDARG(AP, T, N) struct Qdmy
|
||||
|
||||
#undef const
|
||||
#undef volatile
|
||||
#undef signed
|
||||
|
||||
/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
|
||||
it too, but it's not in C89. */
|
||||
#undef inline
|
||||
#if __STDC_VERSION__ > 199901L
|
||||
/* it's a keyword */
|
||||
#else
|
||||
# if GCC_VERSION >= 2007
|
||||
# define inline __inline__ /* __inline__ prevents -pedantic warnings */
|
||||
# else
|
||||
# define inline /* nothing */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* These are obsolete. Do not use. */
|
||||
#ifndef IN_GCC
|
||||
#define CONST const
|
||||
#define VOLATILE volatile
|
||||
#define SIGNED signed
|
||||
|
||||
#define PROTO(type, name, arglist) type name arglist
|
||||
#define EXFUN(name, proto) name proto
|
||||
#define DEFUN(name, arglist, args) name(args)
|
||||
#define DEFUN_VOID(name) name(void)
|
||||
#define AND ,
|
||||
#define DOTS , ...
|
||||
#define NOARGS void
|
||||
#endif /* ! IN_GCC */
|
||||
|
||||
#else /* Not ANSI C. */
|
||||
|
||||
#undef ANSI_PROTOTYPES
|
||||
#define PTR char *
|
||||
#define PTRCONST PTR
|
||||
#define LONG_DOUBLE double
|
||||
|
||||
#define PARAMS(args) ()
|
||||
#define VPARAMS(args) (va_alist) va_dcl
|
||||
#define VA_START(va_list, var) va_start(va_list)
|
||||
|
||||
#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP); { struct Qdmy
|
||||
#define VA_CLOSE(AP) } va_end(AP); }
|
||||
#define VA_FIXEDARG(AP, TYPE, NAME) TYPE NAME = va_arg(AP, TYPE)
|
||||
|
||||
/* some systems define these in header files for non-ansi mode */
|
||||
#undef const
|
||||
#undef volatile
|
||||
#undef signed
|
||||
#undef inline
|
||||
#define const
|
||||
#define volatile
|
||||
#define signed
|
||||
#define inline
|
||||
|
||||
#ifndef IN_GCC
|
||||
#define CONST
|
||||
#define VOLATILE
|
||||
#define SIGNED
|
||||
|
||||
#define PROTO(type, name, arglist) type name ()
|
||||
#define EXFUN(name, proto) name()
|
||||
#define DEFUN(name, arglist, args) name arglist args;
|
||||
#define DEFUN_VOID(name) name()
|
||||
#define AND ;
|
||||
#define DOTS
|
||||
#define NOARGS
|
||||
#endif /* ! IN_GCC */
|
||||
|
||||
#endif /* ANSI C. */
|
||||
|
||||
/* Define macros for some gcc attributes. This permits us to use the
|
||||
macros freely, and know that they will come into play for the
|
||||
version of gcc in which they are supported. */
|
||||
|
||||
#if (GCC_VERSION < 2007)
|
||||
# define __attribute__(x)
|
||||
#endif
|
||||
|
||||
/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
|
||||
#ifndef ATTRIBUTE_MALLOC
|
||||
# if (GCC_VERSION >= 2096)
|
||||
# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
|
||||
# else
|
||||
# define ATTRIBUTE_MALLOC
|
||||
# endif /* GNUC >= 2.96 */
|
||||
#endif /* ATTRIBUTE_MALLOC */
|
||||
|
||||
/* Attributes on labels were valid as of gcc 2.93. */
|
||||
#ifndef ATTRIBUTE_UNUSED_LABEL
|
||||
# if (!defined (__cplusplus) && GCC_VERSION >= 2093)
|
||||
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED_LABEL
|
||||
# endif /* !__cplusplus && GNUC >= 2.93 */
|
||||
#endif /* ATTRIBUTE_UNUSED_LABEL */
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
#endif /* ATTRIBUTE_UNUSED */
|
||||
|
||||
/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the
|
||||
identifier name. */
|
||||
#if ! defined(__cplusplus) || (GCC_VERSION >= 3004)
|
||||
# define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED
|
||||
#else /* !__cplusplus || GNUC >= 3.4 */
|
||||
# define ARG_UNUSED(NAME) NAME
|
||||
#endif /* !__cplusplus || GNUC >= 3.4 */
|
||||
|
||||
#ifndef ATTRIBUTE_NORETURN
|
||||
#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
|
||||
#endif /* ATTRIBUTE_NORETURN */
|
||||
|
||||
/* Attribute `nonnull' was valid as of gcc 3.3. */
|
||||
#ifndef ATTRIBUTE_NONNULL
|
||||
# if (GCC_VERSION >= 3003)
|
||||
# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
|
||||
# else
|
||||
# define ATTRIBUTE_NONNULL(m)
|
||||
# endif /* GNUC >= 3.3 */
|
||||
#endif /* ATTRIBUTE_NONNULL */
|
||||
|
||||
/* Attribute `pure' was valid as of gcc 3.0. */
|
||||
#ifndef ATTRIBUTE_PURE
|
||||
# if (GCC_VERSION >= 3000)
|
||||
# define ATTRIBUTE_PURE __attribute__ ((__pure__))
|
||||
# else
|
||||
# define ATTRIBUTE_PURE
|
||||
# endif /* GNUC >= 3.0 */
|
||||
#endif /* ATTRIBUTE_PURE */
|
||||
|
||||
/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL.
|
||||
This was the case for the `printf' format attribute by itself
|
||||
before GCC 3.3, but as of 3.3 we need to add the `nonnull'
|
||||
attribute to retain this behavior. */
|
||||
#ifndef ATTRIBUTE_PRINTF
|
||||
#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m)
|
||||
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
|
||||
#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
|
||||
#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
|
||||
#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
|
||||
#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
|
||||
#endif /* ATTRIBUTE_PRINTF */
|
||||
|
||||
/* Use ATTRIBUTE_FPTR_PRINTF when the format attribute is to be set on
|
||||
a function pointer. Format attributes were allowed on function
|
||||
pointers as of gcc 3.1. */
|
||||
#ifndef ATTRIBUTE_FPTR_PRINTF
|
||||
# if (GCC_VERSION >= 3001)
|
||||
# define ATTRIBUTE_FPTR_PRINTF(m, n) ATTRIBUTE_PRINTF(m, n)
|
||||
# else
|
||||
# define ATTRIBUTE_FPTR_PRINTF(m, n)
|
||||
# endif /* GNUC >= 3.1 */
|
||||
# define ATTRIBUTE_FPTR_PRINTF_1 ATTRIBUTE_FPTR_PRINTF(1, 2)
|
||||
# define ATTRIBUTE_FPTR_PRINTF_2 ATTRIBUTE_FPTR_PRINTF(2, 3)
|
||||
# define ATTRIBUTE_FPTR_PRINTF_3 ATTRIBUTE_FPTR_PRINTF(3, 4)
|
||||
# define ATTRIBUTE_FPTR_PRINTF_4 ATTRIBUTE_FPTR_PRINTF(4, 5)
|
||||
# define ATTRIBUTE_FPTR_PRINTF_5 ATTRIBUTE_FPTR_PRINTF(5, 6)
|
||||
#endif /* ATTRIBUTE_FPTR_PRINTF */
|
||||
|
||||
/* Use ATTRIBUTE_NULL_PRINTF when the format specifier may be NULL. A
|
||||
NULL format specifier was allowed as of gcc 3.3. */
|
||||
#ifndef ATTRIBUTE_NULL_PRINTF
|
||||
# if (GCC_VERSION >= 3003)
|
||||
# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
|
||||
# else
|
||||
# define ATTRIBUTE_NULL_PRINTF(m, n)
|
||||
# endif /* GNUC >= 3.3 */
|
||||
# define ATTRIBUTE_NULL_PRINTF_1 ATTRIBUTE_NULL_PRINTF(1, 2)
|
||||
# define ATTRIBUTE_NULL_PRINTF_2 ATTRIBUTE_NULL_PRINTF(2, 3)
|
||||
# define ATTRIBUTE_NULL_PRINTF_3 ATTRIBUTE_NULL_PRINTF(3, 4)
|
||||
# define ATTRIBUTE_NULL_PRINTF_4 ATTRIBUTE_NULL_PRINTF(4, 5)
|
||||
# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6)
|
||||
#endif /* ATTRIBUTE_NULL_PRINTF */
|
||||
|
||||
/* Attribute `sentinel' was valid as of gcc 3.5. */
|
||||
#ifndef ATTRIBUTE_SENTINEL
|
||||
# if (GCC_VERSION >= 3005)
|
||||
# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
|
||||
# else
|
||||
# define ATTRIBUTE_SENTINEL
|
||||
# endif /* GNUC >= 3.5 */
|
||||
#endif /* ATTRIBUTE_SENTINEL */
|
||||
|
||||
|
||||
#ifndef ATTRIBUTE_ALIGNED_ALIGNOF
|
||||
# if (GCC_VERSION >= 3000)
|
||||
# define ATTRIBUTE_ALIGNED_ALIGNOF(m) __attribute__ ((__aligned__ (__alignof__ (m))))
|
||||
# else
|
||||
# define ATTRIBUTE_ALIGNED_ALIGNOF(m)
|
||||
# endif /* GNUC >= 3.0 */
|
||||
#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */
|
||||
|
||||
/* We use __extension__ in some places to suppress -pedantic warnings
|
||||
about GCC extensions. This feature didn't work properly before
|
||||
gcc 2.8. */
|
||||
#if GCC_VERSION < 2008
|
||||
#define __extension__
|
||||
#endif
|
||||
|
||||
#endif /* ansidecl.h */
|
||||
@@ -1,219 +0,0 @@
|
||||
2005-05-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* Update the address and phone number of the FSF organization in
|
||||
the GPL notices in the following files:
|
||||
adobe.h, aout64.h, ar.h, dynix3.h, encap.h, host.h, hp.h,
|
||||
ranlib.h, reloc.h, stab.def, stab_gnu.h, sun4.h
|
||||
|
||||
2004-01-06 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* stab.def: Add N_PATCH to DO definition.
|
||||
|
||||
2003-03-06 Elias Athanasopoulos <elathan@phys.uoa.gr>
|
||||
|
||||
* aout64.h (BYTES_IN_WORD): Define if necessary.
|
||||
|
||||
2001-09-18 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* aout64.h: Formatting fixes.
|
||||
(N_TXTADDR): Evaluate to a bfd_vma.
|
||||
(N_DATADDR): Avoid negative unsigned warning.
|
||||
* hp300hpux.h: Formatting fixes.
|
||||
(N_DATADDR): Avoid negative unsigned warning.
|
||||
|
||||
2000-04-03 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
* aout64.h (RELOC_EXT_BITS_EXTERN_BIG): Wrap definition in #ifndef.
|
||||
(RELOC_EXT_BITS_EXTERN_LITTLE): Ditto.
|
||||
(RELOC_EXT_BITS_TYPE_BIG): Ditto.
|
||||
(RELOC_EXT_BITS_TYPE_SH_BIG): Ditto.
|
||||
(RELOC_EXT_BITS_TYPE_LITTLE): Ditto.
|
||||
(RELOC_EXT_BITS_TYPE_SH_LITTLE): Ditto.
|
||||
|
||||
1999-07-12 Ian Lance Taylor <ian@zembu.com>
|
||||
|
||||
* aout64.h (N_SHARED_LIB): Define as 0 if TEXT_START_ADDR is
|
||||
defined as 0.
|
||||
|
||||
1998-06-28 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
|
||||
|
||||
* stab.def: Add N_ALIAS from SunPro F77.
|
||||
|
||||
1996-03-11 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* stab.def: Use __define_stab_duplicate rather than __define_stab
|
||||
for duplicate entries N_BROWS and N_MOD2.
|
||||
* stab_gnu.h (__define_stab_duplicate): Define before including
|
||||
stab.def.
|
||||
|
||||
1995-10-27 Niklas Hallqvist <niklas@appli.se>
|
||||
|
||||
* aout64.h, host.h, hp300hpux.h, sun4.h: Changed PAGE_SIZE to
|
||||
TARGET_PAGE_SIZE.
|
||||
|
||||
1995-09-12 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* sun4.h (struct internal_sun4_dynamic_link): Change all fields
|
||||
from long to unsigned long.
|
||||
|
||||
1995-07-12 Ken Raeburn <raeburn@kr-pc.cygnus.com>
|
||||
|
||||
* sun4.h (PAGE_SIZE): Undefine before defining.
|
||||
|
||||
1994-09-04 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
|
||||
|
||||
* aout64.h: Only define QMAGIC if it isn't already defined.
|
||||
|
||||
1994-06-16 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* aout64.h (BMAGIC): Define.
|
||||
|
||||
1994-06-11 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
Add weak symbols as an extension to a.out.
|
||||
* aout64.h (N_WEAKU, N_WEAKA, N_WEAKT, N_WEAKD, N_WEAKB): Define.
|
||||
* stab.def: Update symbol value table.
|
||||
|
||||
1994-06-02 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* sun4.h (EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE): Correct from 28 to
|
||||
24. Fix up ld_got comment.
|
||||
|
||||
1994-03-30 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* dynix3.h: Cleanup, adapt to current bfd version.
|
||||
|
||||
1994-02-26 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* aout64.h: Add casts to avoid warnings from SVR4 cc.
|
||||
|
||||
1994-02-11 Stan Shebs (shebs@andros.cygnus.com)
|
||||
|
||||
* ar.h (ARMAG, ARMAGB, ARFMAG): Change '\n' to '\012', for greater
|
||||
portability.
|
||||
|
||||
1994-01-21 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* sun4.h: Added information about SunOS shared libraries.
|
||||
|
||||
1994-01-07 Jim Kingdon (kingdon@deneb.cygnus.com)
|
||||
|
||||
* aout64.h (N_TXTADDR): Add comment regarding OMAGIC and NMAGIC.
|
||||
|
||||
1993-12-25 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* aout64.h (N_DATOFF): Don't pad (revert change of 8 Jul 1993).
|
||||
|
||||
1993-11-16 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* aout64.h: New macros ZMAGIC_DISK_BLOCK_SIZE and N_DISK_BLOCK_SIZE
|
||||
for Linux ZMAGIC.
|
||||
(N_TXTOFF, N_DATOFF): Use them.
|
||||
|
||||
1993-11-04 Ken Raeburn (raeburn@kr-pc.cygnus.com)
|
||||
|
||||
* aout64.h (RELOC_STD_BITS_RELATIVE_LITTLE): Fixed value to match
|
||||
sun3 system; used to overlap other fields.
|
||||
(RELOC_STD_BITS_JMPTABLE_LITTLE): Likewise.
|
||||
|
||||
1993-11-03 David J. Mackenzie (djm@thepub.cygnus.com)
|
||||
|
||||
* aout64.h (RELOC_STD_BITS_BASEREL_LITTLE): Make it 0x10 (Ken's
|
||||
suggestion) to avoid conflict with RELOC_STD_BITS_EXTERN_LITTLE.
|
||||
|
||||
1993-10-29 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* hp300hpux.h (N_SHARED_LIB): Define to be 0.
|
||||
|
||||
1993-09-13 John Gilmore (gnu@cygnus.com)
|
||||
|
||||
* ar.h (ARMAP_TIME_OFFSET): Add and describe.
|
||||
|
||||
Mon Aug 23 Sean Fagan (sef@cygnus.com)
|
||||
|
||||
* aout64.h [ARCH_SIZE != 64]: Allow N_BADMAG to be overridden.
|
||||
|
||||
1993-08-16 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* stab_gnu.h: Include aout/stab.def not just stab.def.
|
||||
|
||||
1993-07-18 Jim Kingdon (kingdon@rtl.cygnus.com)
|
||||
|
||||
* dynix3.h: New, for symmetry running dynix.
|
||||
|
||||
1993-07-08 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* aout64.h (N_BADMAG): Recognize QMAGIC.
|
||||
N_TXTOFF, N_TXTADDR, N_TXTSIZE: Special code for QMAGIC.
|
||||
N_DATOFF: Pad text size if we need to.
|
||||
|
||||
1993-06-18 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* stab.def (N_ECOML): Fix comment.
|
||||
|
||||
1993-05-31 Jim Kingdon (kingdon@cygnus.com)
|
||||
|
||||
* stab.def: Remove Solaris information on N_FUN stabstring grammar;
|
||||
I've transferred it to gdb/doc/stabs.texinfo, where it belongs.
|
||||
|
||||
1993-05-10 Ken Raeburn (raeburn@kr-pc.cygnus.com)
|
||||
|
||||
* hp300hpux.h: Patch from Glenn Engel for linker problem and
|
||||
compatibility fix:
|
||||
(OMAGIC, NMAGIC): New definitions.
|
||||
(SHAREMAGIC): Deleted.
|
||||
(HPUX_DOT_O_MAGIC): New macro.
|
||||
(_N_BADMAG): Adjusted.
|
||||
(N_HEADER_IN_TEXT, N_DATADDR): New macros.
|
||||
|
||||
1993-04-29 Ken Raeburn (raeburn@deneb.cygnus.com)
|
||||
|
||||
* hp300hpux.h: New file from Glenn Engel, glenne@lsid.hp.com.
|
||||
|
||||
1993-04-27 Ken Raeburn (raeburn@kr-pc.cygnus.com)
|
||||
|
||||
* aout64.h (struct external_exec, *MAGIC, N_BADMAG): Don't define
|
||||
if `external_exec' is already defined as a macro.
|
||||
(N_DATOFF, N_TRELOFF, N_DRELOFF, N_SYMOFF, N_STROFF): Don't define
|
||||
if already defined.
|
||||
(struct external_nlist, EXTERNAL_NLIST_SIZE): Don't define if
|
||||
`external_nlist' is already defined as a macro.
|
||||
|
||||
1992-08-15 John Gilmore (gnu@cygnus.com)
|
||||
|
||||
* adobe.h: Add description of a.out.adobe format.
|
||||
|
||||
1992-07-03 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* stab.def: Update more Solaris definitions.
|
||||
* stab_gnu.h: Add N_SO language types, and Solaris basic float types.
|
||||
|
||||
1992-06-14 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* stab.def: Update descriptions of Solaris-2 stabs; add N_UNDF.
|
||||
|
||||
1992-06-11 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* stab.def: Add N_OBJ and N_OPT from Solaris-2.
|
||||
|
||||
1992-01-30 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* aout64.h: N_TXTSIZE needs some more parentheses.
|
||||
I don't trust C precedence.
|
||||
|
||||
1991-12-18 Per Bothner (bothner at cygnus.com)
|
||||
|
||||
* aout64.h: Move common sunos-specific test
|
||||
to recognize shared libraries into new macro N_SHARED_LIB.
|
||||
Use it to simplify & reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE.
|
||||
|
||||
1991-11-30 Steve Chamberlain (sac at rtl.cygnus.com)
|
||||
|
||||
* aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h, reloc.h,
|
||||
stab.def, stab_gnu.h, sun4.h: All moved from the devo/include
|
||||
directory.
|
||||
|
||||
|
||||
Local Variables:
|
||||
version-control: never
|
||||
End:
|
||||
@@ -1,313 +0,0 @@
|
||||
/* `a.out.adobe' differences from standard a.out files
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef __A_OUT_ADOBE_H__
|
||||
#define __A_OUT_ADOBE_H__
|
||||
|
||||
#define BYTES_IN_WORD 4
|
||||
|
||||
/* Struct external_exec is the same. */
|
||||
|
||||
/* This is the layout on disk of the 32-bit or 64-bit exec header. */
|
||||
|
||||
struct external_exec
|
||||
{
|
||||
bfd_byte e_info[4]; /* magic number and stuff */
|
||||
bfd_byte e_text[BYTES_IN_WORD]; /* length of text section in bytes */
|
||||
bfd_byte e_data[BYTES_IN_WORD]; /* length of data section in bytes */
|
||||
bfd_byte e_bss[BYTES_IN_WORD]; /* length of bss area in bytes */
|
||||
bfd_byte e_syms[BYTES_IN_WORD]; /* length of symbol table in bytes */
|
||||
bfd_byte e_entry[BYTES_IN_WORD]; /* start address */
|
||||
bfd_byte e_trsize[BYTES_IN_WORD]; /* length of text relocation info */
|
||||
bfd_byte e_drsize[BYTES_IN_WORD]; /* length of data relocation info */
|
||||
};
|
||||
|
||||
#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7)
|
||||
|
||||
/* Magic numbers for a.out files */
|
||||
|
||||
#undef ZMAGIC
|
||||
#define ZMAGIC 0xAD0BE /* Cute, eh? */
|
||||
#undef OMAGIC
|
||||
#undef NMAGIC
|
||||
|
||||
#define N_BADMAG(x) ((x).a_info != ZMAGIC)
|
||||
|
||||
/* By default, segment size is constant. But some machines override this
|
||||
to be a function of the a.out header (e.g. machine type). */
|
||||
#ifndef N_SEGSIZE
|
||||
#define N_SEGSIZE(x) SEGMENT_SIZE
|
||||
#endif
|
||||
#undef N_SEGSIZE /* FIXMEXXXX */
|
||||
|
||||
/* Segment information for the a.out.Adobe format is specified after the
|
||||
file header. It contains N segment descriptors, followed by one with
|
||||
a type of zero.
|
||||
|
||||
The actual text of the segments starts at N_TXTOFF in the file,
|
||||
regardless of how many or how few segment headers there are. */
|
||||
|
||||
struct external_segdesc {
|
||||
unsigned char e_type[1];
|
||||
unsigned char e_size[3];
|
||||
unsigned char e_virtbase[4];
|
||||
unsigned char e_filebase[4];
|
||||
};
|
||||
|
||||
struct internal_segdesc {
|
||||
unsigned int a_type:8; /* Segment type N_TEXT, N_DATA, 0 */
|
||||
unsigned int a_size:24; /* Segment size */
|
||||
bfd_vma a_virtbase; /* Virtual address */
|
||||
unsigned int a_filebase; /* Base address in object file */
|
||||
};
|
||||
|
||||
#define N_TXTADDR(x) \
|
||||
|
||||
/* This is documented to be at 1024, but appears to really be at 2048.
|
||||
FIXME?! */
|
||||
#define N_TXTOFF(x) 2048
|
||||
|
||||
#define N_TXTSIZE(x) ((x).a_text)
|
||||
|
||||
#define N_DATADDR(x)
|
||||
|
||||
#define N_BSSADDR(x)
|
||||
|
||||
/* Offsets of the various portions of the file after the text segment. */
|
||||
|
||||
#define N_DATOFF(x) ( N_TXTOFF(x) + N_TXTSIZE(x) )
|
||||
#define N_TRELOFF(x) ( N_DATOFF(x) + (x).a_data )
|
||||
#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
|
||||
#define N_SYMOFF(x) ( N_DRELOFF(x) + (x).a_drsize )
|
||||
#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
|
||||
|
||||
/* Symbols */
|
||||
struct external_nlist {
|
||||
bfd_byte e_strx[BYTES_IN_WORD]; /* index into string table of name */
|
||||
bfd_byte e_type[1]; /* type of symbol */
|
||||
bfd_byte e_other[1]; /* misc info (usually empty) */
|
||||
bfd_byte e_desc[2]; /* description field */
|
||||
bfd_byte e_value[BYTES_IN_WORD]; /* value of symbol */
|
||||
};
|
||||
|
||||
#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD)
|
||||
|
||||
struct internal_nlist {
|
||||
unsigned long n_strx; /* index into string table of name */
|
||||
unsigned char n_type; /* type of symbol */
|
||||
unsigned char n_other; /* misc info (usually empty) */
|
||||
unsigned short n_desc; /* description field */
|
||||
bfd_vma n_value; /* value of symbol */
|
||||
};
|
||||
|
||||
/* The n_type field is the symbol type, containing: */
|
||||
|
||||
#define N_UNDF 0 /* Undefined symbol */
|
||||
#define N_ABS 2 /* Absolute symbol -- defined at particular addr */
|
||||
#define N_TEXT 4 /* Text sym -- defined at offset in text seg */
|
||||
#define N_DATA 6 /* Data sym -- defined at offset in data seg */
|
||||
#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg */
|
||||
#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink) */
|
||||
#define N_FN 0x1f /* File name of .o file */
|
||||
#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh) */
|
||||
/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT,
|
||||
N_DATA, or N_BSS. When the low-order bit of other types is set,
|
||||
(e.g. N_WARNING versus N_FN), they are two different types. */
|
||||
#define N_EXT 1 /* External symbol (as opposed to local-to-this-file) */
|
||||
#define N_TYPE 0x1e
|
||||
#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol */
|
||||
|
||||
#define N_INDR 0x0a
|
||||
|
||||
/* The following symbols refer to set elements.
|
||||
All the N_SET[ATDB] symbols with the same name form one set.
|
||||
Space is allocated for the set in the text section, and each set
|
||||
elements value is stored into one word of the space.
|
||||
The first word of the space is the length of the set (number of elements).
|
||||
|
||||
The address of the set is made into an N_SETV symbol
|
||||
whose name is the same as the name of the set.
|
||||
This symbol acts like a N_DATA global symbol
|
||||
in that it can satisfy undefined external references. */
|
||||
|
||||
/* These appear as input to LD, in a .o file. */
|
||||
#define N_SETA 0x14 /* Absolute set element symbol */
|
||||
#define N_SETT 0x16 /* Text set element symbol */
|
||||
#define N_SETD 0x18 /* Data set element symbol */
|
||||
#define N_SETB 0x1A /* Bss set element symbol */
|
||||
|
||||
/* This is output from LD. */
|
||||
#define N_SETV 0x1C /* Pointer to set vector in data area. */
|
||||
|
||||
/* Warning symbol. The text gives a warning message, the next symbol
|
||||
in the table will be undefined. When the symbol is referenced, the
|
||||
message is printed. */
|
||||
|
||||
#define N_WARNING 0x1e
|
||||
|
||||
/* Relocations
|
||||
|
||||
There are two types of relocation flavours for a.out systems,
|
||||
standard and extended. The standard form is used on systems where the
|
||||
instruction has room for all the bits of an offset to the operand, whilst
|
||||
the extended form is used when an address operand has to be split over n
|
||||
instructions. Eg, on the 68k, each move instruction can reference
|
||||
the target with a displacement of 16 or 32 bits. On the sparc, move
|
||||
instructions use an offset of 14 bits, so the offset is stored in
|
||||
the reloc field, and the data in the section is ignored.
|
||||
*/
|
||||
|
||||
/* This structure describes a single relocation to be performed.
|
||||
The text-relocation section of the file is a vector of these structures,
|
||||
all of which apply to the text section.
|
||||
Likewise, the data-relocation section applies to the data section. */
|
||||
|
||||
struct reloc_std_external {
|
||||
bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
|
||||
bfd_byte r_index[3]; /* symbol table index of symbol */
|
||||
bfd_byte r_type[1]; /* relocation type */
|
||||
};
|
||||
|
||||
#define RELOC_STD_BITS_PCREL_BIG 0x80
|
||||
#define RELOC_STD_BITS_PCREL_LITTLE 0x01
|
||||
|
||||
#define RELOC_STD_BITS_LENGTH_BIG 0x60
|
||||
#define RELOC_STD_BITS_LENGTH_SH_BIG 5 /* To shift to units place */
|
||||
#define RELOC_STD_BITS_LENGTH_LITTLE 0x06
|
||||
#define RELOC_STD_BITS_LENGTH_SH_LITTLE 1
|
||||
|
||||
#define RELOC_STD_BITS_EXTERN_BIG 0x10
|
||||
#define RELOC_STD_BITS_EXTERN_LITTLE 0x08
|
||||
|
||||
#define RELOC_STD_BITS_BASEREL_BIG 0x08
|
||||
#define RELOC_STD_BITS_BASEREL_LITTLE 0x08
|
||||
|
||||
#define RELOC_STD_BITS_JMPTABLE_BIG 0x04
|
||||
#define RELOC_STD_BITS_JMPTABLE_LITTLE 0x04
|
||||
|
||||
#define RELOC_STD_BITS_RELATIVE_BIG 0x02
|
||||
#define RELOC_STD_BITS_RELATIVE_LITTLE 0x02
|
||||
|
||||
#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry */
|
||||
|
||||
struct reloc_std_internal
|
||||
{
|
||||
bfd_vma r_address; /* Address (within segment) to be relocated. */
|
||||
/* The meaning of r_symbolnum depends on r_extern. */
|
||||
unsigned int r_symbolnum:24;
|
||||
/* Nonzero means value is a pc-relative offset
|
||||
and it should be relocated for changes in its own address
|
||||
as well as for changes in the symbol or section specified. */
|
||||
unsigned int r_pcrel:1;
|
||||
/* Length (as exponent of 2) of the field to be relocated.
|
||||
Thus, a value of 2 indicates 1<<2 bytes. */
|
||||
unsigned int r_length:2;
|
||||
/* 1 => relocate with value of symbol.
|
||||
r_symbolnum is the index of the symbol
|
||||
in files the symbol table.
|
||||
0 => relocate with the address of a segment.
|
||||
r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
|
||||
(the N_EXT bit may be set also, but signifies nothing). */
|
||||
unsigned int r_extern:1;
|
||||
/* The next three bits are for SunOS shared libraries, and seem to
|
||||
be undocumented. */
|
||||
unsigned int r_baserel:1; /* Linkage table relative */
|
||||
unsigned int r_jmptable:1; /* pc-relative to jump table */
|
||||
unsigned int r_relative:1; /* "relative relocation" */
|
||||
/* unused */
|
||||
unsigned int r_pad:1; /* Padding -- set to zero */
|
||||
};
|
||||
|
||||
|
||||
/* EXTENDED RELOCS */
|
||||
|
||||
struct reloc_ext_external {
|
||||
bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
|
||||
bfd_byte r_index[3]; /* symbol table index of symbol */
|
||||
bfd_byte r_type[1]; /* relocation type */
|
||||
bfd_byte r_addend[BYTES_IN_WORD]; /* datum addend */
|
||||
};
|
||||
|
||||
#define RELOC_EXT_BITS_EXTERN_BIG 0x80
|
||||
#define RELOC_EXT_BITS_EXTERN_LITTLE 0x01
|
||||
|
||||
#define RELOC_EXT_BITS_TYPE_BIG 0x1F
|
||||
#define RELOC_EXT_BITS_TYPE_SH_BIG 0
|
||||
#define RELOC_EXT_BITS_TYPE_LITTLE 0xF8
|
||||
#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3
|
||||
|
||||
/* Bytes per relocation entry */
|
||||
#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD)
|
||||
|
||||
enum reloc_type
|
||||
{
|
||||
/* simple relocations */
|
||||
RELOC_8, /* data[0:7] = addend + sv */
|
||||
RELOC_16, /* data[0:15] = addend + sv */
|
||||
RELOC_32, /* data[0:31] = addend + sv */
|
||||
/* pc-rel displacement */
|
||||
RELOC_DISP8, /* data[0:7] = addend - pc + sv */
|
||||
RELOC_DISP16, /* data[0:15] = addend - pc + sv */
|
||||
RELOC_DISP32, /* data[0:31] = addend - pc + sv */
|
||||
/* Special */
|
||||
RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */
|
||||
RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */
|
||||
RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */
|
||||
RELOC_22, /* data[0:21] = (addend + sv) */
|
||||
RELOC_13, /* data[0:12] = (addend + sv) */
|
||||
RELOC_LO10, /* data[0:9] = (addend + sv) */
|
||||
RELOC_SFA_BASE,
|
||||
RELOC_SFA_OFF13,
|
||||
/* P.I.C. (base-relative) */
|
||||
RELOC_BASE10, /* Not sure - maybe we can do this the */
|
||||
RELOC_BASE13, /* right way now */
|
||||
RELOC_BASE22,
|
||||
/* for some sort of pc-rel P.I.C. (?) */
|
||||
RELOC_PC10,
|
||||
RELOC_PC22,
|
||||
/* P.I.C. jump table */
|
||||
RELOC_JMP_TBL,
|
||||
/* reputedly for shared libraries somehow */
|
||||
RELOC_SEGOFF16,
|
||||
RELOC_GLOB_DAT,
|
||||
RELOC_JMP_SLOT,
|
||||
RELOC_RELATIVE,
|
||||
|
||||
RELOC_11,
|
||||
RELOC_WDISP2_14,
|
||||
RELOC_WDISP19,
|
||||
RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */
|
||||
RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */
|
||||
|
||||
/* 29K relocation types */
|
||||
RELOC_JUMPTARG,
|
||||
RELOC_CONST,
|
||||
RELOC_CONSTH,
|
||||
|
||||
NO_RELOC
|
||||
};
|
||||
|
||||
|
||||
struct reloc_internal {
|
||||
bfd_vma r_address; /* offset of of data to relocate */
|
||||
long r_index; /* symbol table index of symbol */
|
||||
enum reloc_type r_type; /* relocation type */
|
||||
bfd_vma r_addend; /* datum addend */
|
||||
};
|
||||
|
||||
#endif /* __A_OUT_ADOBE_H__ */
|
||||
@@ -1,519 +0,0 @@
|
||||
/* `a.out' object-file definitions, including extensions to 64-bit fields
|
||||
|
||||
Copyright 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef __A_OUT_64_H__
|
||||
#define __A_OUT_64_H__
|
||||
|
||||
#ifndef BYTES_IN_WORD
|
||||
#define BYTES_IN_WORD 4
|
||||
#endif
|
||||
|
||||
/* This is the layout on disk of the 32-bit or 64-bit exec header. */
|
||||
|
||||
#ifndef external_exec
|
||||
struct external_exec
|
||||
{
|
||||
bfd_byte e_info[4]; /* Magic number and stuff. */
|
||||
bfd_byte e_text[BYTES_IN_WORD]; /* Length of text section in bytes. */
|
||||
bfd_byte e_data[BYTES_IN_WORD]; /* Length of data section in bytes. */
|
||||
bfd_byte e_bss[BYTES_IN_WORD]; /* Length of bss area in bytes. */
|
||||
bfd_byte e_syms[BYTES_IN_WORD]; /* Length of symbol table in bytes. */
|
||||
bfd_byte e_entry[BYTES_IN_WORD]; /* Start address. */
|
||||
bfd_byte e_trsize[BYTES_IN_WORD]; /* Length of text relocation info. */
|
||||
bfd_byte e_drsize[BYTES_IN_WORD]; /* Length of data relocation info. */
|
||||
};
|
||||
|
||||
#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7)
|
||||
|
||||
/* Magic numbers for a.out files. */
|
||||
|
||||
#if ARCH_SIZE==64
|
||||
#define OMAGIC 0x1001 /* Code indicating object file. */
|
||||
#define ZMAGIC 0x1002 /* Code indicating demand-paged executable. */
|
||||
#define NMAGIC 0x1003 /* Code indicating pure executable. */
|
||||
|
||||
/* There is no 64-bit QMAGIC as far as I know. */
|
||||
|
||||
#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
|
||||
&& N_MAGIC(x) != NMAGIC \
|
||||
&& N_MAGIC(x) != ZMAGIC)
|
||||
#else
|
||||
#define OMAGIC 0407 /* Object file or impure executable. */
|
||||
#define NMAGIC 0410 /* Code indicating pure executable. */
|
||||
#define ZMAGIC 0413 /* Code indicating demand-paged executable. */
|
||||
#define BMAGIC 0415 /* Used by a b.out object. */
|
||||
|
||||
/* This indicates a demand-paged executable with the header in the text.
|
||||
It is used by 386BSD (and variants) and Linux, at least. */
|
||||
#ifndef QMAGIC
|
||||
#define QMAGIC 0314
|
||||
#endif
|
||||
# ifndef N_BADMAG
|
||||
# define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
|
||||
&& N_MAGIC(x) != NMAGIC \
|
||||
&& N_MAGIC(x) != ZMAGIC \
|
||||
&& N_MAGIC(x) != QMAGIC)
|
||||
# endif /* N_BADMAG */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef QMAGIC
|
||||
#define N_IS_QMAGIC(x) (N_MAGIC (x) == QMAGIC)
|
||||
#else
|
||||
#define N_IS_QMAGIC(x) (0)
|
||||
#endif
|
||||
|
||||
/* The difference between TARGET_PAGE_SIZE and N_SEGSIZE is that TARGET_PAGE_SIZE is
|
||||
the finest granularity at which you can page something, thus it
|
||||
controls the padding (if any) before the text segment of a ZMAGIC
|
||||
file. N_SEGSIZE is the resolution at which things can be marked as
|
||||
read-only versus read/write, so it controls the padding between the
|
||||
text segment and the data segment (in memory; on disk the padding
|
||||
between them is TARGET_PAGE_SIZE). TARGET_PAGE_SIZE and N_SEGSIZE are the same
|
||||
for most machines, but different for sun3. */
|
||||
|
||||
/* By default, segment size is constant. But some machines override this
|
||||
to be a function of the a.out header (e.g. machine type). */
|
||||
|
||||
#ifndef N_SEGSIZE
|
||||
#define N_SEGSIZE(x) SEGMENT_SIZE
|
||||
#endif
|
||||
|
||||
/* Virtual memory address of the text section.
|
||||
This is getting very complicated. A good reason to discard a.out format
|
||||
for something that specifies these fields explicitly. But til then...
|
||||
|
||||
* OMAGIC and NMAGIC files:
|
||||
(object files: text for "relocatable addr 0" right after the header)
|
||||
start at 0, offset is EXEC_BYTES_SIZE, size as stated.
|
||||
* The text address, offset, and size of ZMAGIC files depend
|
||||
on the entry point of the file:
|
||||
* entry point below TEXT_START_ADDR:
|
||||
(hack for SunOS shared libraries)
|
||||
start at 0, offset is 0, size as stated.
|
||||
* If N_HEADER_IN_TEXT(x) is true (which defaults to being the
|
||||
case when the entry point is EXEC_BYTES_SIZE or further into a page):
|
||||
no padding is needed; text can start after exec header. Sun
|
||||
considers the text segment of such files to include the exec header;
|
||||
for BFD's purposes, we don't, which makes more work for us.
|
||||
start at TEXT_START_ADDR + EXEC_BYTES_SIZE, offset is EXEC_BYTES_SIZE,
|
||||
size as stated minus EXEC_BYTES_SIZE.
|
||||
* If N_HEADER_IN_TEXT(x) is false (which defaults to being the case when
|
||||
the entry point is less than EXEC_BYTES_SIZE into a page (e.g. page
|
||||
aligned)): (padding is needed so that text can start at a page boundary)
|
||||
start at TEXT_START_ADDR, offset TARGET_PAGE_SIZE, size as stated.
|
||||
|
||||
Specific configurations may want to hardwire N_HEADER_IN_TEXT,
|
||||
for efficiency or to allow people to play games with the entry point.
|
||||
In that case, you would #define N_HEADER_IN_TEXT(x) as 1 for sunos,
|
||||
and as 0 for most other hosts (Sony News, Vax Ultrix, etc).
|
||||
(Do this in the appropriate bfd target file.)
|
||||
(The default is a heuristic that will break if people try changing
|
||||
the entry point, perhaps with the ld -e flag.)
|
||||
|
||||
* QMAGIC is always like a ZMAGIC for which N_HEADER_IN_TEXT is true,
|
||||
and for which the starting address is TARGET_PAGE_SIZE (or should this be
|
||||
SEGMENT_SIZE?) (TEXT_START_ADDR only applies to ZMAGIC, not to QMAGIC). */
|
||||
|
||||
/* This macro is only relevant for ZMAGIC files; QMAGIC always has the header
|
||||
in the text. */
|
||||
#ifndef N_HEADER_IN_TEXT
|
||||
#define N_HEADER_IN_TEXT(x) \
|
||||
(((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
|
||||
#endif
|
||||
|
||||
/* Sun shared libraries, not linux. This macro is only relevant for ZMAGIC
|
||||
files. */
|
||||
#ifndef N_SHARED_LIB
|
||||
#if defined (TEXT_START_ADDR) && TEXT_START_ADDR == 0
|
||||
#define N_SHARED_LIB(x) (0)
|
||||
#else
|
||||
#define N_SHARED_LIB(x) ((x).a_entry < TEXT_START_ADDR)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Returning 0 not TEXT_START_ADDR for OMAGIC and NMAGIC is based on
|
||||
the assumption that we are dealing with a .o file, not an
|
||||
executable. This is necessary for OMAGIC (but means we don't work
|
||||
right on the output from ld -N); more questionable for NMAGIC. */
|
||||
|
||||
#ifndef N_TXTADDR
|
||||
#define N_TXTADDR(x) \
|
||||
(/* The address of a QMAGIC file is always one page in, \
|
||||
with the header in the text. */ \
|
||||
N_IS_QMAGIC (x) \
|
||||
? (bfd_vma) TARGET_PAGE_SIZE + EXEC_BYTES_SIZE \
|
||||
: (N_MAGIC (x) != ZMAGIC \
|
||||
? (bfd_vma) 0 /* Object file or NMAGIC. */ \
|
||||
: (N_SHARED_LIB (x) \
|
||||
? (bfd_vma) 0 \
|
||||
: (N_HEADER_IN_TEXT (x) \
|
||||
? (bfd_vma) TEXT_START_ADDR + EXEC_BYTES_SIZE \
|
||||
: (bfd_vma) TEXT_START_ADDR))))
|
||||
#endif
|
||||
|
||||
/* If N_HEADER_IN_TEXT is not true for ZMAGIC, there is some padding
|
||||
to make the text segment start at a certain boundary. For most
|
||||
systems, this boundary is TARGET_PAGE_SIZE. But for Linux, in the
|
||||
time-honored tradition of crazy ZMAGIC hacks, it is 1024 which is
|
||||
not what TARGET_PAGE_SIZE needs to be for QMAGIC. */
|
||||
|
||||
#ifndef ZMAGIC_DISK_BLOCK_SIZE
|
||||
#define ZMAGIC_DISK_BLOCK_SIZE TARGET_PAGE_SIZE
|
||||
#endif
|
||||
|
||||
#define N_DISK_BLOCK_SIZE(x) \
|
||||
(N_MAGIC(x) == ZMAGIC ? ZMAGIC_DISK_BLOCK_SIZE : TARGET_PAGE_SIZE)
|
||||
|
||||
/* Offset in an a.out of the start of the text section. */
|
||||
#ifndef N_TXTOFF
|
||||
#define N_TXTOFF(x) \
|
||||
(/* For {O,N,Q}MAGIC, no padding. */ \
|
||||
N_MAGIC (x) != ZMAGIC \
|
||||
? EXEC_BYTES_SIZE \
|
||||
: (N_SHARED_LIB (x) \
|
||||
? 0 \
|
||||
: (N_HEADER_IN_TEXT (x) \
|
||||
? EXEC_BYTES_SIZE /* No padding. */ \
|
||||
: ZMAGIC_DISK_BLOCK_SIZE /* A page of padding. */)))
|
||||
#endif
|
||||
/* Size of the text section. It's always as stated, except that we
|
||||
offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF
|
||||
for ZMAGIC files that nominally include the exec header
|
||||
as part of the first page of text. (BFD doesn't consider the
|
||||
exec header to be part of the text segment.) */
|
||||
#ifndef N_TXTSIZE
|
||||
#define N_TXTSIZE(x) \
|
||||
(/* For QMAGIC, we don't consider the header part of the text section. */\
|
||||
N_IS_QMAGIC (x) \
|
||||
? (x).a_text - EXEC_BYTES_SIZE \
|
||||
: ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x)) \
|
||||
? (x).a_text \
|
||||
: (N_HEADER_IN_TEXT (x) \
|
||||
? (x).a_text - EXEC_BYTES_SIZE /* No padding. */ \
|
||||
: (x).a_text /* A page of padding. */ )))
|
||||
#endif
|
||||
/* The address of the data segment in virtual memory.
|
||||
It is the text segment address, plus text segment size, rounded
|
||||
up to a N_SEGSIZE boundary for pure or pageable files. */
|
||||
#ifndef N_DATADDR
|
||||
#define N_DATADDR(x) \
|
||||
(N_MAGIC (x) == OMAGIC \
|
||||
? (N_TXTADDR (x) + N_TXTSIZE (x)) \
|
||||
: (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \
|
||||
& ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
|
||||
#endif
|
||||
/* The address of the BSS segment -- immediately after the data segment. */
|
||||
|
||||
#define N_BSSADDR(x) (N_DATADDR (x) + (x).a_data)
|
||||
|
||||
/* Offsets of the various portions of the file after the text segment. */
|
||||
|
||||
/* For {Q,Z}MAGIC, there is padding to make the data segment start on
|
||||
a page boundary. Most of the time the a_text field (and thus
|
||||
N_TXTSIZE) already contains this padding. It is possible that for
|
||||
BSDI and/or 386BSD it sometimes doesn't contain the padding, and
|
||||
perhaps we should be adding it here. But this seems kind of
|
||||
questionable and probably should be BSDI/386BSD-specific if we do
|
||||
do it.
|
||||
|
||||
For NMAGIC (at least for hp300 BSD, probably others), there is
|
||||
padding in memory only, not on disk, so we must *not* ever pad here
|
||||
for NMAGIC. */
|
||||
|
||||
#ifndef N_DATOFF
|
||||
#define N_DATOFF(x) (N_TXTOFF (x) + N_TXTSIZE (x))
|
||||
#endif
|
||||
#ifndef N_TRELOFF
|
||||
#define N_TRELOFF(x) (N_DATOFF (x) + (x).a_data)
|
||||
#endif
|
||||
#ifndef N_DRELOFF
|
||||
#define N_DRELOFF(x) (N_TRELOFF (x) + (x).a_trsize)
|
||||
#endif
|
||||
#ifndef N_SYMOFF
|
||||
#define N_SYMOFF(x) (N_DRELOFF (x) + (x).a_drsize)
|
||||
#endif
|
||||
#ifndef N_STROFF
|
||||
#define N_STROFF(x) (N_SYMOFF (x) + (x).a_syms)
|
||||
#endif
|
||||
|
||||
/* Symbols */
|
||||
#ifndef external_nlist
|
||||
struct external_nlist
|
||||
{
|
||||
bfd_byte e_strx[BYTES_IN_WORD]; /* Index into string table of name. */
|
||||
bfd_byte e_type[1]; /* Type of symbol. */
|
||||
bfd_byte e_other[1]; /* Misc info (usually empty). */
|
||||
bfd_byte e_desc[2]; /* Description field. */
|
||||
bfd_byte e_value[BYTES_IN_WORD]; /* Value of symbol. */
|
||||
};
|
||||
#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD)
|
||||
#endif
|
||||
|
||||
struct internal_nlist
|
||||
{
|
||||
unsigned long n_strx; /* Index into string table of name. */
|
||||
unsigned char n_type; /* Type of symbol. */
|
||||
unsigned char n_other; /* Misc info (usually empty). */
|
||||
unsigned short n_desc; /* Description field. */
|
||||
bfd_vma n_value; /* Value of symbol. */
|
||||
};
|
||||
|
||||
/* The n_type field is the symbol type, containing: */
|
||||
|
||||
#define N_UNDF 0 /* Undefined symbol. */
|
||||
#define N_ABS 2 /* Absolute symbol -- defined at particular addr. */
|
||||
#define N_TEXT 4 /* Text sym -- defined at offset in text seg. */
|
||||
#define N_DATA 6 /* Data sym -- defined at offset in data seg. */
|
||||
#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg. */
|
||||
#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink). */
|
||||
#define N_FN 0x1f /* File name of .o file. */
|
||||
#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh). */
|
||||
/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT,
|
||||
N_DATA, or N_BSS. When the low-order bit of other types is set,
|
||||
(e.g. N_WARNING versus N_FN), they are two different types. */
|
||||
#define N_EXT 1 /* External symbol (as opposed to local-to-this-file). */
|
||||
#define N_TYPE 0x1e
|
||||
#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol. */
|
||||
|
||||
#define N_INDR 0x0a
|
||||
|
||||
/* The following symbols refer to set elements.
|
||||
All the N_SET[ATDB] symbols with the same name form one set.
|
||||
Space is allocated for the set in the text section, and each set
|
||||
elements value is stored into one word of the space.
|
||||
The first word of the space is the length of the set (number of elements).
|
||||
|
||||
The address of the set is made into an N_SETV symbol
|
||||
whose name is the same as the name of the set.
|
||||
This symbol acts like a N_DATA global symbol
|
||||
in that it can satisfy undefined external references. */
|
||||
|
||||
/* These appear as input to LD, in a .o file. */
|
||||
#define N_SETA 0x14 /* Absolute set element symbol. */
|
||||
#define N_SETT 0x16 /* Text set element symbol. */
|
||||
#define N_SETD 0x18 /* Data set element symbol. */
|
||||
#define N_SETB 0x1A /* Bss set element symbol. */
|
||||
|
||||
/* This is output from LD. */
|
||||
#define N_SETV 0x1C /* Pointer to set vector in data area. */
|
||||
|
||||
/* Warning symbol. The text gives a warning message, the next symbol
|
||||
in the table will be undefined. When the symbol is referenced, the
|
||||
message is printed. */
|
||||
|
||||
#define N_WARNING 0x1e
|
||||
|
||||
/* Weak symbols. These are a GNU extension to the a.out format. The
|
||||
semantics are those of ELF weak symbols. Weak symbols are always
|
||||
externally visible. The N_WEAK? values are squeezed into the
|
||||
available slots. The value of a N_WEAKU symbol is 0. The values
|
||||
of the other types are the definitions. */
|
||||
#define N_WEAKU 0x0d /* Weak undefined symbol. */
|
||||
#define N_WEAKA 0x0e /* Weak absolute symbol. */
|
||||
#define N_WEAKT 0x0f /* Weak text symbol. */
|
||||
#define N_WEAKD 0x10 /* Weak data symbol. */
|
||||
#define N_WEAKB 0x11 /* Weak bss symbol. */
|
||||
|
||||
/* Relocations
|
||||
|
||||
There are two types of relocation flavours for a.out systems,
|
||||
standard and extended. The standard form is used on systems where the
|
||||
instruction has room for all the bits of an offset to the operand, whilst
|
||||
the extended form is used when an address operand has to be split over n
|
||||
instructions. Eg, on the 68k, each move instruction can reference
|
||||
the target with a displacement of 16 or 32 bits. On the sparc, move
|
||||
instructions use an offset of 14 bits, so the offset is stored in
|
||||
the reloc field, and the data in the section is ignored. */
|
||||
|
||||
/* This structure describes a single relocation to be performed.
|
||||
The text-relocation section of the file is a vector of these structures,
|
||||
all of which apply to the text section.
|
||||
Likewise, the data-relocation section applies to the data section. */
|
||||
|
||||
struct reloc_std_external
|
||||
{
|
||||
bfd_byte r_address[BYTES_IN_WORD]; /* Offset of of data to relocate. */
|
||||
bfd_byte r_index[3]; /* Symbol table index of symbol. */
|
||||
bfd_byte r_type[1]; /* Relocation type. */
|
||||
};
|
||||
|
||||
#define RELOC_STD_BITS_PCREL_BIG ((unsigned int) 0x80)
|
||||
#define RELOC_STD_BITS_PCREL_LITTLE ((unsigned int) 0x01)
|
||||
|
||||
#define RELOC_STD_BITS_LENGTH_BIG ((unsigned int) 0x60)
|
||||
#define RELOC_STD_BITS_LENGTH_SH_BIG 5
|
||||
#define RELOC_STD_BITS_LENGTH_LITTLE ((unsigned int) 0x06)
|
||||
#define RELOC_STD_BITS_LENGTH_SH_LITTLE 1
|
||||
|
||||
#define RELOC_STD_BITS_EXTERN_BIG ((unsigned int) 0x10)
|
||||
#define RELOC_STD_BITS_EXTERN_LITTLE ((unsigned int) 0x08)
|
||||
|
||||
#define RELOC_STD_BITS_BASEREL_BIG ((unsigned int) 0x08)
|
||||
#define RELOC_STD_BITS_BASEREL_LITTLE ((unsigned int) 0x10)
|
||||
|
||||
#define RELOC_STD_BITS_JMPTABLE_BIG ((unsigned int) 0x04)
|
||||
#define RELOC_STD_BITS_JMPTABLE_LITTLE ((unsigned int) 0x20)
|
||||
|
||||
#define RELOC_STD_BITS_RELATIVE_BIG ((unsigned int) 0x02)
|
||||
#define RELOC_STD_BITS_RELATIVE_LITTLE ((unsigned int) 0x40)
|
||||
|
||||
#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry. */
|
||||
|
||||
struct reloc_std_internal
|
||||
{
|
||||
bfd_vma r_address; /* Address (within segment) to be relocated. */
|
||||
/* The meaning of r_symbolnum depends on r_extern. */
|
||||
unsigned int r_symbolnum:24;
|
||||
/* Nonzero means value is a pc-relative offset
|
||||
and it should be relocated for changes in its own address
|
||||
as well as for changes in the symbol or section specified. */
|
||||
unsigned int r_pcrel:1;
|
||||
/* Length (as exponent of 2) of the field to be relocated.
|
||||
Thus, a value of 2 indicates 1<<2 bytes. */
|
||||
unsigned int r_length:2;
|
||||
/* 1 => relocate with value of symbol.
|
||||
r_symbolnum is the index of the symbol
|
||||
in files the symbol table.
|
||||
0 => relocate with the address of a segment.
|
||||
r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
|
||||
(the N_EXT bit may be set also, but signifies nothing). */
|
||||
unsigned int r_extern:1;
|
||||
/* The next three bits are for SunOS shared libraries, and seem to
|
||||
be undocumented. */
|
||||
unsigned int r_baserel:1; /* Linkage table relative. */
|
||||
unsigned int r_jmptable:1; /* pc-relative to jump table. */
|
||||
unsigned int r_relative:1; /* "relative relocation". */
|
||||
/* unused */
|
||||
unsigned int r_pad:1; /* Padding -- set to zero. */
|
||||
};
|
||||
|
||||
|
||||
/* EXTENDED RELOCS. */
|
||||
|
||||
struct reloc_ext_external
|
||||
{
|
||||
bfd_byte r_address[BYTES_IN_WORD]; /* Offset of of data to relocate. */
|
||||
bfd_byte r_index[3]; /* Symbol table index of symbol. */
|
||||
bfd_byte r_type[1]; /* Relocation type. */
|
||||
bfd_byte r_addend[BYTES_IN_WORD]; /* Datum addend. */
|
||||
};
|
||||
|
||||
#ifndef RELOC_EXT_BITS_EXTERN_BIG
|
||||
#define RELOC_EXT_BITS_EXTERN_BIG ((unsigned int) 0x80)
|
||||
#endif
|
||||
|
||||
#ifndef RELOC_EXT_BITS_EXTERN_LITTLE
|
||||
#define RELOC_EXT_BITS_EXTERN_LITTLE ((unsigned int) 0x01)
|
||||
#endif
|
||||
|
||||
#ifndef RELOC_EXT_BITS_TYPE_BIG
|
||||
#define RELOC_EXT_BITS_TYPE_BIG ((unsigned int) 0x1F)
|
||||
#endif
|
||||
|
||||
#ifndef RELOC_EXT_BITS_TYPE_SH_BIG
|
||||
#define RELOC_EXT_BITS_TYPE_SH_BIG 0
|
||||
#endif
|
||||
|
||||
#ifndef RELOC_EXT_BITS_TYPE_LITTLE
|
||||
#define RELOC_EXT_BITS_TYPE_LITTLE ((unsigned int) 0xF8)
|
||||
#endif
|
||||
|
||||
#ifndef RELOC_EXT_BITS_TYPE_SH_LITTLE
|
||||
#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3
|
||||
#endif
|
||||
|
||||
/* Bytes per relocation entry. */
|
||||
#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD)
|
||||
|
||||
enum reloc_type
|
||||
{
|
||||
/* Simple relocations. */
|
||||
RELOC_8, /* data[0:7] = addend + sv */
|
||||
RELOC_16, /* data[0:15] = addend + sv */
|
||||
RELOC_32, /* data[0:31] = addend + sv */
|
||||
/* PC-rel displacement. */
|
||||
RELOC_DISP8, /* data[0:7] = addend - pc + sv */
|
||||
RELOC_DISP16, /* data[0:15] = addend - pc + sv */
|
||||
RELOC_DISP32, /* data[0:31] = addend - pc + sv */
|
||||
/* Special. */
|
||||
RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */
|
||||
RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */
|
||||
RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */
|
||||
RELOC_22, /* data[0:21] = (addend + sv) */
|
||||
RELOC_13, /* data[0:12] = (addend + sv) */
|
||||
RELOC_LO10, /* data[0:9] = (addend + sv) */
|
||||
RELOC_SFA_BASE,
|
||||
RELOC_SFA_OFF13,
|
||||
/* P.I.C. (base-relative). */
|
||||
RELOC_BASE10, /* Not sure - maybe we can do this the */
|
||||
RELOC_BASE13, /* right way now */
|
||||
RELOC_BASE22,
|
||||
/* For some sort of pc-rel P.I.C. (?) */
|
||||
RELOC_PC10,
|
||||
RELOC_PC22,
|
||||
/* P.I.C. jump table. */
|
||||
RELOC_JMP_TBL,
|
||||
/* Reputedly for shared libraries somehow. */
|
||||
RELOC_SEGOFF16,
|
||||
RELOC_GLOB_DAT,
|
||||
RELOC_JMP_SLOT,
|
||||
RELOC_RELATIVE,
|
||||
|
||||
RELOC_11,
|
||||
RELOC_WDISP2_14,
|
||||
RELOC_WDISP19,
|
||||
RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */
|
||||
RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */
|
||||
|
||||
/* 29K relocation types. */
|
||||
RELOC_JUMPTARG,
|
||||
RELOC_CONST,
|
||||
RELOC_CONSTH,
|
||||
|
||||
/* All the new ones I can think of, for sparc v9. */
|
||||
RELOC_64, /* data[0:63] = addend + sv */
|
||||
RELOC_DISP64, /* data[0:63] = addend - pc + sv */
|
||||
RELOC_WDISP21, /* data[0:20] = (addend + sv - pc)>>2 */
|
||||
RELOC_DISP21, /* data[0:20] = addend - pc + sv */
|
||||
RELOC_DISP14, /* data[0:13] = addend - pc + sv */
|
||||
/* Q .
|
||||
What are the other ones,
|
||||
Since this is a clean slate, can we throw away the ones we dont
|
||||
understand ? Should we sort the values ? What about using a
|
||||
microcode format like the 68k ? */
|
||||
NO_RELOC
|
||||
};
|
||||
|
||||
|
||||
struct reloc_internal
|
||||
{
|
||||
bfd_vma r_address; /* Offset of of data to relocate. */
|
||||
long r_index; /* Symbol table index of symbol. */
|
||||
enum reloc_type r_type; /* Relocation type. */
|
||||
bfd_vma r_addend; /* Datum addend. */
|
||||
};
|
||||
|
||||
/* Q.
|
||||
Should the length of the string table be 4 bytes or 8 bytes ?
|
||||
|
||||
Q.
|
||||
What about archive indexes ? */
|
||||
|
||||
#endif /* __A_OUT_64_H__ */
|
||||
@@ -1,52 +0,0 @@
|
||||
/* archive file definition for GNU software
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* So far this is correct for BSDish archives. Don't forget that
|
||||
files must begin on an even byte boundary. */
|
||||
|
||||
#ifndef __GNU_AR_H__
|
||||
#define __GNU_AR_H__
|
||||
|
||||
/* Note that the usual '\n' in magic strings may translate to different
|
||||
characters, as allowed by ANSI. '\012' has a fixed value, and remains
|
||||
compatible with existing BSDish archives. */
|
||||
|
||||
#define ARMAG "!<arch>\012" /* For COFF and a.out archives */
|
||||
#define ARMAGB "!<bout>\012" /* For b.out archives */
|
||||
#define SARMAG 8
|
||||
#define ARFMAG "`\012"
|
||||
|
||||
/* The ar_date field of the armap (__.SYMDEF) member of an archive
|
||||
must be greater than the modified date of the entire file, or
|
||||
BSD-derived linkers complain. We originally write the ar_date with
|
||||
this offset from the real file's mod-time. After finishing the
|
||||
file, we rewrite ar_date if it's not still greater than the mod date. */
|
||||
|
||||
#define ARMAP_TIME_OFFSET 60
|
||||
|
||||
struct ar_hdr {
|
||||
char ar_name[16]; /* name of this member */
|
||||
char ar_date[12]; /* file mtime */
|
||||
char ar_uid[6]; /* owner uid; printed as decimal */
|
||||
char ar_gid[6]; /* owner gid; printed as decimal */
|
||||
char ar_mode[8]; /* file mode, printed as octal */
|
||||
char ar_size[10]; /* file size, printed as decimal */
|
||||
char ar_fmag[2]; /* should contain ARFMAG */
|
||||
};
|
||||
|
||||
#endif /* __GNU_AR_H__ */
|
||||
@@ -1,86 +0,0 @@
|
||||
/* a.out specifics for Sequent Symmetry running Dynix 3.x
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef A_OUT_DYNIX3_H
|
||||
#define A_OUT_DYNIX3_H
|
||||
|
||||
#define external_exec dynix_external_exec
|
||||
|
||||
/* struct exec for Dynix 3
|
||||
|
||||
a_gdtbl and a_bootstrap are only for standalone binaries.
|
||||
Shared data fields are not supported by the kernel as of Dynix 3.1,
|
||||
but are supported by Dynix compiler programs. */
|
||||
struct dynix_external_exec
|
||||
{
|
||||
unsigned char e_info[4];
|
||||
unsigned char e_text[4];
|
||||
unsigned char e_data[4];
|
||||
unsigned char e_bss[4];
|
||||
unsigned char e_syms[4];
|
||||
unsigned char e_entry[4];
|
||||
unsigned char e_trsize[4];
|
||||
unsigned char e_drsize[4];
|
||||
unsigned char e_g_code[8];
|
||||
unsigned char e_g_data[8];
|
||||
unsigned char e_g_desc[8];
|
||||
unsigned char e_shdata[4];
|
||||
unsigned char e_shbss[4];
|
||||
unsigned char e_shdrsize[4];
|
||||
unsigned char e_bootstrap[44];
|
||||
unsigned char e_reserved[12];
|
||||
unsigned char e_version[4];
|
||||
};
|
||||
|
||||
#define EXEC_BYTES_SIZE (128)
|
||||
|
||||
/* All executables under Dynix are demand paged with read-only text,
|
||||
Thus no NMAGIC.
|
||||
|
||||
ZMAGIC has a page of 0s at virtual 0,
|
||||
XMAGIC has an invalid page at virtual 0. */
|
||||
#define OMAGIC 0x12eb /* .o */
|
||||
#define ZMAGIC 0x22eb /* zero @ 0, demand load */
|
||||
#define XMAGIC 0x32eb /* invalid @ 0, demand load */
|
||||
#define SMAGIC 0x42eb /* standalone, not supported here */
|
||||
|
||||
#define N_BADMAG(x) ((OMAGIC != N_MAGIC(x)) && \
|
||||
(ZMAGIC != N_MAGIC(x)) && \
|
||||
(XMAGIC != N_MAGIC(x)) && \
|
||||
(SMAGIC != N_MAGIC(x)))
|
||||
|
||||
#define N_ADDRADJ(x) ((ZMAGIC == N_MAGIC(x) || XMAGIC == N_MAGIC(x)) ? 0x1000 : 0)
|
||||
|
||||
#define N_TXTOFF(x) (EXEC_BYTES_SIZE)
|
||||
#define N_DATOFF(x) (N_TXTOFF(x) + N_TXTSIZE(x))
|
||||
#define N_SHDATOFF(x) (N_DATOFF(x) + (x).a_data)
|
||||
#define N_TRELOFF(x) (N_SHDATOFF(x) + (x).a_shdata)
|
||||
#define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize)
|
||||
#define N_SHDRELOFF(x) (N_DRELOFF(x) + (x).a_drsize)
|
||||
#define N_SYMOFF(x) (N_SHDRELOFF(x) + (x).a_shdrsize)
|
||||
#define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms)
|
||||
|
||||
#define N_TXTADDR(x) \
|
||||
(((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? 0 \
|
||||
: TEXT_START_ADDR + EXEC_BYTES_SIZE)
|
||||
|
||||
#define N_TXTSIZE(x) \
|
||||
(((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? ((x).a_text) \
|
||||
: ((x).a_text - N_ADDRADJ(x) - EXEC_BYTES_SIZE))
|
||||
|
||||
#endif /* A_OUT_DYNIX3_H */
|
||||
@@ -1,134 +0,0 @@
|
||||
/* Yet Another Try at encapsulating bsd object files in coff.
|
||||
Copyright 1988, 1989, 1991 Free Software Foundation, Inc.
|
||||
Written by Pace Willisson 12/9/88
|
||||
|
||||
This file is obsolete. It needs to be converted to just define a bunch
|
||||
of stuff that BFD can use to do coff-encapsulated files. --gnu@cygnus.com
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/*
|
||||
* We only use the coff headers to tell the kernel
|
||||
* how to exec the file. Therefore, the only fields that need to
|
||||
* be filled in are the scnptr and vaddr for the text and data
|
||||
* sections, and the vaddr for the bss. As far as coff is concerned,
|
||||
* there is no symbol table, relocation, or line numbers.
|
||||
*
|
||||
* A normal bsd header (struct exec) is placed after the coff headers,
|
||||
* and before the real text. I defined a the new fields 'a_machtype'
|
||||
* and a_flags. If a_machtype is M_386, and a_flags & A_ENCAP is
|
||||
* true, then the bsd header is preceeded by a coff header. Macros
|
||||
* like N_TXTOFF and N_TXTADDR use this field to find the bsd header.
|
||||
*
|
||||
* The only problem is to track down the bsd exec header. The
|
||||
* macros HEADER_OFFSET, etc do this.
|
||||
*/
|
||||
|
||||
#define N_FLAGS_COFF_ENCAPSULATE 0x20 /* coff header precedes bsd header */
|
||||
|
||||
/* Describe the COFF header used for encapsulation. */
|
||||
|
||||
struct coffheader
|
||||
{
|
||||
/* filehdr */
|
||||
unsigned short f_magic;
|
||||
unsigned short f_nscns;
|
||||
long f_timdat;
|
||||
long f_symptr;
|
||||
long f_nsyms;
|
||||
unsigned short f_opthdr;
|
||||
unsigned short f_flags;
|
||||
/* aouthdr */
|
||||
short magic;
|
||||
short vstamp;
|
||||
long tsize;
|
||||
long dsize;
|
||||
long bsize;
|
||||
long entry;
|
||||
long text_start;
|
||||
long data_start;
|
||||
struct coffscn
|
||||
{
|
||||
char s_name[8];
|
||||
long s_paddr;
|
||||
long s_vaddr;
|
||||
long s_size;
|
||||
long s_scnptr;
|
||||
long s_relptr;
|
||||
long s_lnnoptr;
|
||||
unsigned short s_nreloc;
|
||||
unsigned short s_nlnno;
|
||||
long s_flags;
|
||||
} scns[3];
|
||||
};
|
||||
|
||||
/* Describe some of the parameters of the encapsulation,
|
||||
including how to find the encapsulated BSD header. */
|
||||
|
||||
/* FIXME, this is dumb. The same tools can't handle a.outs for different
|
||||
architectures, just because COFF_MAGIC is different; so you need a
|
||||
separate GNU nm for every architecture!!? Unfortunately, it needs to
|
||||
be this way, since the COFF_MAGIC value is determined by the kernel
|
||||
we're trying to fool here. */
|
||||
|
||||
#define COFF_MAGIC_I386 0514 /* I386MAGIC */
|
||||
#define COFF_MAGIC_M68K 0520 /* MC68MAGIC */
|
||||
|
||||
#ifdef COFF_MAGIC
|
||||
short __header_offset_temp;
|
||||
#define HEADER_OFFSET(f) \
|
||||
(__header_offset_temp = 0, \
|
||||
fread ((char *)&__header_offset_temp, sizeof (short), 1, (f)), \
|
||||
fseek ((f), -sizeof (short), 1), \
|
||||
__header_offset_temp==COFF_MAGIC ? sizeof(struct coffheader) : 0)
|
||||
#else
|
||||
#define HEADER_OFFSET(f) 0
|
||||
#endif
|
||||
|
||||
#define HEADER_SEEK(f) (fseek ((f), HEADER_OFFSET((f)), 1))
|
||||
|
||||
/* Describe the characteristics of the BSD header
|
||||
that appears inside the encapsulation. */
|
||||
|
||||
/* Encapsulated coff files that are linked ZMAGIC have a text segment
|
||||
offset just past the header (and a matching TXTADDR), excluding
|
||||
the headers from the text segment proper but keeping the physical
|
||||
layout and the virtual memory layout page-aligned.
|
||||
|
||||
Non-encapsulated a.out files that are linked ZMAGIC have a text
|
||||
segment that starts at 0 and an N_TXTADR similarly offset to 0.
|
||||
They too are page-aligned with each other, but they include the
|
||||
a.out header as part of the text.
|
||||
|
||||
The _N_HDROFF gets sizeof struct exec added to it, so we have
|
||||
to compensate here. See <a.out.gnu.h>. */
|
||||
|
||||
#undef _N_HDROFF
|
||||
#undef N_TXTADDR
|
||||
#undef N_DATADDR
|
||||
|
||||
#define _N_HDROFF(x) ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
|
||||
sizeof (struct coffheader) : 0)
|
||||
|
||||
/* Address of text segment in memory after it is loaded. */
|
||||
#define N_TXTADDR(x) \
|
||||
((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
|
||||
sizeof (struct coffheader) + sizeof (struct exec) : 0)
|
||||
#define SEGMENT_SIZE 0x400000
|
||||
|
||||
#define N_DATADDR(x) \
|
||||
((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
|
||||
(SEGMENT_SIZE + ((N_TXTADDR(x)+(x).a_text-1) & ~(SEGMENT_SIZE-1))) : \
|
||||
(N_TXTADDR(x)+(x).a_text))
|
||||
@@ -1,42 +0,0 @@
|
||||
/* host.h - Parameters about the a.out format, based on the host system
|
||||
on which the program is compiled.
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Address of data segment in memory after it is loaded.
|
||||
It is up to you to define SEGMENT_SIZE on machines not listed here. */
|
||||
#ifndef SEGMENT_SIZE
|
||||
|
||||
#if defined(hp300) || defined(pyr)
|
||||
#define SEGMENT_SIZE page_size
|
||||
#endif
|
||||
|
||||
#ifdef sony
|
||||
#define SEGMENT_SIZE 0x1000
|
||||
#endif /* Sony. */
|
||||
|
||||
#ifdef is68k
|
||||
#define SEGMENT_SIZE 0x20000
|
||||
#endif
|
||||
|
||||
#if defined(m68k) && defined(PORTAR)
|
||||
#define TARGET_PAGE_SIZE 0x400
|
||||
#define SEGMENT_SIZE TARGET_PAGE_SIZE
|
||||
#endif
|
||||
|
||||
#endif /*!defined(SEGMENT_SIZE)*/
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
/* Special version of <a.out.h> for use under hp-ux.
|
||||
Copyright 1988, 1991 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* THIS FILE IS OBSOLETE. It needs to be revised as a variant "external"
|
||||
a.out format for use with BFD. */
|
||||
|
||||
/* The `exec' structure and overall layout must be close to HP's when
|
||||
we are running on an HP system, otherwise we will not be able to
|
||||
execute the resulting file. */
|
||||
|
||||
/* Allow this file to be included twice. */
|
||||
#ifndef __GNU_EXEC_MACROS__
|
||||
|
||||
struct exec
|
||||
{
|
||||
unsigned short a_machtype; /* machine type */
|
||||
unsigned short a_magic; /* magic number */
|
||||
unsigned long a_spare1;
|
||||
unsigned long a_spare2;
|
||||
unsigned long a_text; /* length of text, in bytes */
|
||||
unsigned long a_data; /* length of data, in bytes */
|
||||
unsigned long a_bss; /* length of uninitialized data area for file, in bytes */
|
||||
unsigned long a_trsize; /* length of relocation info for text, in bytes */
|
||||
unsigned long a_drsize; /* length of relocation info for data, in bytes */
|
||||
unsigned long a_spare3; /* HP = pascal interface size */
|
||||
unsigned long a_spare4; /* HP = symbol table size */
|
||||
unsigned long a_spare5; /* HP = debug name table size */
|
||||
unsigned long a_entry; /* start address */
|
||||
unsigned long a_spare6; /* HP = source line table size */
|
||||
unsigned long a_spare7; /* HP = value table size */
|
||||
unsigned long a_syms; /* length of symbol table data in file, in bytes */
|
||||
unsigned long a_spare8;
|
||||
};
|
||||
|
||||
/* Tell a.out.gnu.h not to define `struct exec'. */
|
||||
#define __STRUCT_EXEC_OVERRIDE__
|
||||
|
||||
#include "../a.out.gnu.h"
|
||||
|
||||
#undef N_MAGIC
|
||||
#undef N_MACHTYPE
|
||||
#undef N_FLAGS
|
||||
#undef N_SET_INFO
|
||||
#undef N_SET_MAGIC
|
||||
#undef N_SET_MACHTYPE
|
||||
#undef N_SET_FLAGS
|
||||
|
||||
#define N_MAGIC(exec) ((exec) . a_magic)
|
||||
#define N_MACHTYPE(exec) ((exec) . a_machtype)
|
||||
#define N_SET_MAGIC(exec, magic) (((exec) . a_magic) = (magic))
|
||||
#define N_SET_MACHTYPE(exec, machtype) (((exec) . a_machtype) = (machtype))
|
||||
|
||||
#undef N_BADMAG
|
||||
#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
|
||||
|
||||
#define _N_BADMACH(x) \
|
||||
(((N_MACHTYPE (x)) != HP9000S200_ID) && \
|
||||
((N_MACHTYPE (x)) != HP98x6_ID))
|
||||
|
||||
#define HP98x6_ID 0x20A
|
||||
#define HP9000S200_ID 0x20C
|
||||
|
||||
#undef _N_HDROFF
|
||||
#define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
|
||||
|
||||
#define SEGMENT_SIZE 0x1000
|
||||
|
||||
#endif /* __GNU_EXEC_MACROS__ */
|
||||
@@ -1,119 +0,0 @@
|
||||
/* Special version of <a.out.h> for use under hp-ux.
|
||||
Copyright 1988, 1993, 1995, 2001 Free Software Foundation, Inc. */
|
||||
|
||||
struct hp300hpux_exec_bytes
|
||||
{
|
||||
unsigned char e_info[4]; /* a_machtype/a_magic */
|
||||
unsigned char e_spare1[4];
|
||||
unsigned char e_spare2[4];
|
||||
unsigned char e_text[4]; /* length of text, in bytes */
|
||||
unsigned char e_data[4]; /* length of data, in bytes */
|
||||
unsigned char e_bss[4]; /* length of uninitialized data area , in bytes */
|
||||
unsigned char e_trsize[4]; /* length of relocation info for text, in bytes*/
|
||||
unsigned char e_drsize[4]; /* length of relocation info for data, in bytes*/
|
||||
unsigned char e_passize[4];/* HP = pascal interface size */
|
||||
unsigned char e_syms[4]; /* HP = symbol table size */
|
||||
unsigned char e_spare5[4]; /* HP = debug name table size */
|
||||
unsigned char e_entry[4]; /* start address */
|
||||
unsigned char e_spare6[4]; /* HP = source line table size */
|
||||
unsigned char e_supsize[4];/* HP = value table size */
|
||||
unsigned char e_drelocs[4];
|
||||
unsigned char e_extension[4]; /* file offset of extension */
|
||||
};
|
||||
#define EXEC_BYTES_SIZE 64
|
||||
|
||||
struct hp300hpux_nlist_bytes
|
||||
{
|
||||
unsigned char e_value[4];
|
||||
unsigned char e_type[1];
|
||||
unsigned char e_length[1]; /* length of ascii symbol name */
|
||||
unsigned char e_almod[2]; /* alignment mod */
|
||||
unsigned char e_shlib[2]; /* info about dynamic linking */
|
||||
};
|
||||
#define EXTERNAL_NLIST_SIZE 10
|
||||
|
||||
struct hp300hpux_reloc
|
||||
{
|
||||
unsigned char r_address[4];/* offset of of data to relocate */
|
||||
unsigned char r_index[2]; /* symbol table index of symbol */
|
||||
unsigned char r_type[1]; /* relocation type */
|
||||
unsigned char r_length[1]; /* length of item to reloc */
|
||||
};
|
||||
|
||||
struct hp300hpux_header_extension
|
||||
{
|
||||
unsigned char e_syms[4];
|
||||
unsigned char unique_headers[12*4];
|
||||
unsigned char e_header[2]; /* type of header */
|
||||
unsigned char e_version[2]; /* version */
|
||||
unsigned char e_size[4]; /* bytes following*/
|
||||
unsigned char e_extension[4];/* file offset of next extension */
|
||||
};
|
||||
#define EXTERNAL_EXTENSION_HEADER_SIZE (16*4)
|
||||
|
||||
/* hpux separates object files (0x106) and impure executables (0x107) */
|
||||
/* but the bfd code does not distinguish between them. Since we want to*/
|
||||
/* read hpux .o files, we add an special define and use it below in */
|
||||
/* offset and address calculations. */
|
||||
|
||||
#define HPUX_DOT_O_MAGIC 0x106
|
||||
#define OMAGIC 0x107 /* object file or impure executable. */
|
||||
#define NMAGIC 0x108 /* Code indicating pure executable. */
|
||||
#define ZMAGIC 0x10B /* demand-paged executable. */
|
||||
|
||||
#define N_HEADER_IN_TEXT(x) 0
|
||||
|
||||
#if 0 /* libaout.h only uses the lower 8 bits */
|
||||
#define HP98x6_ID 0x20A
|
||||
#define HP9000S200_ID 0x20C
|
||||
#endif
|
||||
#define HP98x6_ID 0x0A
|
||||
#define HP9000S200_ID 0x0C
|
||||
|
||||
#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
|
||||
|
||||
#define N_DATADDR(x) \
|
||||
((N_MAGIC (x) == OMAGIC || N_MAGIC (x) == HPUX_DOT_O_MAGIC) \
|
||||
? (N_TXTADDR (x) + N_TXTSIZE (x)) \
|
||||
: (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \
|
||||
& ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
|
||||
|
||||
#define _N_BADMACH(x) \
|
||||
(((N_MACHTYPE (x)) != HP9000S200_ID) && ((N_MACHTYPE (x)) != HP98x6_ID))
|
||||
|
||||
#define _N_BADMAG(x) (N_MAGIC(x) != HPUX_DOT_O_MAGIC \
|
||||
&& N_MAGIC(x) != OMAGIC \
|
||||
&& N_MAGIC(x) != NMAGIC \
|
||||
&& N_MAGIC(x) != ZMAGIC )
|
||||
|
||||
#undef _N_HDROFF
|
||||
#define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
|
||||
|
||||
#undef N_DATOFF
|
||||
#undef N_PASOFF
|
||||
#undef N_SYMOFF
|
||||
#undef N_SUPOFF
|
||||
#undef N_TRELOFF
|
||||
#undef N_DRELOFF
|
||||
#undef N_STROFF
|
||||
|
||||
#define N_DATOFF(x) ( N_TXTOFF(x) + N_TXTSIZE(x) )
|
||||
#define N_PASOFF(x) ( N_DATOFF(x) + (x).a_data)
|
||||
#define N_SYMOFF(x) ( N_PASOFF(x) /* + (x).a_passize*/ )
|
||||
#define N_SUPOFF(x) ( N_SYMOFF(x) + (x).a_syms )
|
||||
#define N_TRELOFF(x) ( N_SUPOFF(x) /* + 0 (x).a_supsize*/ )
|
||||
#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
|
||||
#define N_EXTHOFF(x) ( N_DRELOFF(x) /* + 0 (x).a_drsize */)
|
||||
#define N_STROFF(x) ( 0 /* no string table */ )
|
||||
|
||||
/* use these when the file has gnu symbol tables */
|
||||
#define N_GNU_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
|
||||
#define N_GNU_DRELOFF(x) (N_GNU_TRELOFF(x) + (x).a_trsize)
|
||||
#define N_GNU_SYMOFF(x) (N_GNU_DRELOFF(x) + (x).a_drsize)
|
||||
|
||||
#define TARGET_PAGE_SIZE 0x1000
|
||||
#define SEGMENT_SIZE 0x1000
|
||||
#define TEXT_START_ADDR 0
|
||||
|
||||
#undef N_SHARED_LIB
|
||||
#define N_SHARED_LIB(x) ( 0 /* no shared libraries */ )
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "filehdr.h"
|
||||
#include "aouthdr.h"
|
||||
#include "scnhdr.h"
|
||||
#include "spacehdr.h"
|
||||
#include "syms.h"
|
||||
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/* ranlib.h -- archive library index member definition for GNU.
|
||||
Copyright 1990, 1991 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* The Symdef member of an archive contains two things:
|
||||
a table that maps symbol-string offsets to file offsets,
|
||||
and a symbol-string table. All the symbol names are
|
||||
run together (each with trailing null) in the symbol-string
|
||||
table. There is a single longword bytecount on the front
|
||||
of each of these tables. Thus if we have two symbols,
|
||||
"foo" and "_bar", that are in archive members at offsets
|
||||
200 and 900, it would look like this:
|
||||
16 ; byte count of index table
|
||||
0 ; offset of "foo" in string table
|
||||
200 ; offset of foo-module in file
|
||||
4 ; offset of "bar" in string table
|
||||
900 ; offset of bar-module in file
|
||||
9 ; byte count of string table
|
||||
"foo\0_bar\0" ; string table */
|
||||
|
||||
#define RANLIBMAG "__.SYMDEF" /* Archive file name containing index */
|
||||
#define RANLIBSKEW 3 /* Creation time offset */
|
||||
|
||||
/* Format of __.SYMDEF:
|
||||
First, a longword containing the size of the 'symdef' data that follows.
|
||||
Second, zero or more 'symdef' structures.
|
||||
Third, a longword containing the length of symbol name strings.
|
||||
Fourth, zero or more symbol name strings (each followed by a null). */
|
||||
|
||||
struct symdef
|
||||
{
|
||||
union
|
||||
{
|
||||
unsigned long string_offset; /* In the file */
|
||||
char *name; /* In memory, sometimes */
|
||||
} s;
|
||||
/* this points to the front of the file header (AKA member header --
|
||||
a struct ar_hdr), not to the front of the file or into the file).
|
||||
in other words it only tells you which file to read */
|
||||
unsigned long file_offset;
|
||||
};
|
||||
|
||||
/* Compatability with BSD code */
|
||||
|
||||
#define ranlib symdef
|
||||
#define ran_un s
|
||||
#define ran_strx string_offset
|
||||
#define ran_name name
|
||||
#define ran_off file_offset
|
||||
@@ -1,66 +0,0 @@
|
||||
/* reloc.h -- Header file for relocation information.
|
||||
Copyright 1989, 1990, 1991 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Relocation types for a.out files using reloc_info_extended
|
||||
(SPARC and AMD 29000). */
|
||||
|
||||
#ifndef _RELOC_H_READ_
|
||||
#define _RELOC_H_READ_ 1
|
||||
|
||||
enum reloc_type
|
||||
{
|
||||
RELOC_8, RELOC_16, RELOC_32, /* simple relocations */
|
||||
RELOC_DISP8, RELOC_DISP16, RELOC_DISP32, /* pc-rel displacement */
|
||||
RELOC_WDISP30, RELOC_WDISP22,
|
||||
RELOC_HI22, RELOC_22,
|
||||
RELOC_13, RELOC_LO10,
|
||||
RELOC_SFA_BASE, RELOC_SFA_OFF13,
|
||||
RELOC_BASE10, RELOC_BASE13, RELOC_BASE22, /* P.I.C. (base-relative) */
|
||||
RELOC_PC10, RELOC_PC22, /* for some sort of pc-rel P.I.C. (?) */
|
||||
RELOC_JMP_TBL, /* P.I.C. jump table */
|
||||
RELOC_SEGOFF16, /* reputedly for shared libraries somehow */
|
||||
RELOC_GLOB_DAT, RELOC_JMP_SLOT, RELOC_RELATIVE,
|
||||
RELOC_11,
|
||||
RELOC_WDISP2_14,
|
||||
RELOC_WDISP19,
|
||||
RELOC_HHI22,
|
||||
RELOC_HLO10,
|
||||
|
||||
/* 29K relocation types */
|
||||
RELOC_JUMPTARG, RELOC_CONST, RELOC_CONSTH,
|
||||
|
||||
RELOC_WDISP14, RELOC_WDISP21,
|
||||
|
||||
NO_RELOC
|
||||
};
|
||||
|
||||
#define RELOC_TYPE_NAMES \
|
||||
"8", "16", "32", "DISP8", \
|
||||
"DISP16", "DISP32", "WDISP30", "WDISP22", \
|
||||
"HI22", "22", "13", "LO10", \
|
||||
"SFA_BASE", "SFAOFF13", "BASE10", "BASE13", \
|
||||
"BASE22", "PC10", "PC22", "JMP_TBL", \
|
||||
"SEGOFF16", "GLOB_DAT", "JMP_SLOT", "RELATIVE", \
|
||||
"11", "WDISP2_14", "WDISP19", "HHI22", \
|
||||
"HLO10", \
|
||||
"JUMPTARG", "CONST", "CONSTH", "WDISP14", \
|
||||
"WDISP21", \
|
||||
"NO_RELOC"
|
||||
|
||||
#endif /* _RELOC_H_READ_ */
|
||||
|
||||
/* end of reloc.h */
|
||||
@@ -1,271 +0,0 @@
|
||||
/* Table of DBX symbol codes for the GNU system.
|
||||
Copyright 1988, 1991, 1992, 1993, 1994, 1996, 1998, 2004
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* New stab from Solaris 2. This uses an n_type of 0, which in a.out files
|
||||
overlaps the N_UNDF used for ordinary symbols. In ELF files, the
|
||||
debug information is in a different file section, so there is no conflict.
|
||||
This symbol's n_value gives the size of the string section associated
|
||||
with this file. The symbol's n_strx (relative to the just-updated
|
||||
string section start address) gives the name of the source file,
|
||||
e.g. "foo.c", without any path information. The symbol's n_desc gives
|
||||
the count of upcoming symbols associated with this file (not including
|
||||
this one). */
|
||||
/* __define_stab (N_UNDF, 0x00, "UNDF") */
|
||||
|
||||
/* Global variable. Only the name is significant.
|
||||
To find the address, look in the corresponding external symbol. */
|
||||
__define_stab (N_GSYM, 0x20, "GSYM")
|
||||
|
||||
/* Function name for BSD Fortran. Only the name is significant.
|
||||
To find the address, look in the corresponding external symbol. */
|
||||
__define_stab (N_FNAME, 0x22, "FNAME")
|
||||
|
||||
/* Function name or text-segment variable for C. Value is its address.
|
||||
Desc is supposedly starting line number, but GCC doesn't set it
|
||||
and DBX seems not to miss it. */
|
||||
__define_stab (N_FUN, 0x24, "FUN")
|
||||
|
||||
/* Data-segment variable with internal linkage. Value is its address.
|
||||
"Static Sym". */
|
||||
__define_stab (N_STSYM, 0x26, "STSYM")
|
||||
|
||||
/* BSS-segment variable with internal linkage. Value is its address. */
|
||||
__define_stab (N_LCSYM, 0x28, "LCSYM")
|
||||
|
||||
/* Name of main routine. Only the name is significant. */
|
||||
__define_stab (N_MAIN, 0x2a, "MAIN")
|
||||
|
||||
/* Solaris2: Read-only data symbols. */
|
||||
__define_stab (N_ROSYM, 0x2c, "ROSYM")
|
||||
|
||||
/* Global symbol in Pascal.
|
||||
Supposedly the value is its line number; I'm skeptical. */
|
||||
__define_stab (N_PC, 0x30, "PC")
|
||||
|
||||
/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */
|
||||
__define_stab (N_NSYMS, 0x32, "NSYMS")
|
||||
|
||||
/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */
|
||||
__define_stab (N_NOMAP, 0x34, "NOMAP")
|
||||
|
||||
/* New stab from Solaris 2. Like N_SO, but for the object file. Two in
|
||||
a row provide the build directory and the relative path of the .o from it.
|
||||
Solaris2 uses this to avoid putting the stabs info into the linked
|
||||
executable; this stab goes into the ".stab.index" section, and the debugger
|
||||
reads the real stabs directly from the .o files instead. */
|
||||
__define_stab (N_OBJ, 0x38, "OBJ")
|
||||
|
||||
/* New stab from Solaris 2. Options for the debugger, related to the
|
||||
source language for this module. E.g. whether to use ANSI
|
||||
integral promotions or traditional integral promotions. */
|
||||
__define_stab (N_OPT, 0x3c, "OPT")
|
||||
|
||||
/* Register variable. Value is number of register. */
|
||||
__define_stab (N_RSYM, 0x40, "RSYM")
|
||||
|
||||
/* Modula-2 compilation unit. Can someone say what info it contains? */
|
||||
__define_stab (N_M2C, 0x42, "M2C")
|
||||
|
||||
/* Line number in text segment. Desc is the line number;
|
||||
value is corresponding address. On Solaris2, the line number is
|
||||
relative to the start of the current function. */
|
||||
__define_stab (N_SLINE, 0x44, "SLINE")
|
||||
|
||||
/* Similar, for data segment. */
|
||||
__define_stab (N_DSLINE, 0x46, "DSLINE")
|
||||
|
||||
/* Similar, for bss segment. */
|
||||
__define_stab (N_BSLINE, 0x48, "BSLINE")
|
||||
|
||||
/* Sun's source-code browser stabs. ?? Don't know what the fields are.
|
||||
Supposedly the field is "path to associated .cb file". THIS VALUE
|
||||
OVERLAPS WITH N_BSLINE! */
|
||||
__define_stab_duplicate (N_BROWS, 0x48, "BROWS")
|
||||
|
||||
/* GNU Modula-2 definition module dependency. Value is the modification time
|
||||
of the definition file. Other is non-zero if it is imported with the
|
||||
GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there
|
||||
are enough empty fields? */
|
||||
__define_stab(N_DEFD, 0x4a, "DEFD")
|
||||
|
||||
/* New in Solaris2. Function start/body/end line numbers. */
|
||||
__define_stab(N_FLINE, 0x4C, "FLINE")
|
||||
|
||||
/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2
|
||||
and one is for C++. Still,... */
|
||||
/* GNU C++ exception variable. Name is variable name. */
|
||||
__define_stab (N_EHDECL, 0x50, "EHDECL")
|
||||
/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */
|
||||
__define_stab_duplicate (N_MOD2, 0x50, "MOD2")
|
||||
|
||||
/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if
|
||||
this entry is immediately followed by a CAUGHT stab saying what exception
|
||||
was caught. Multiple CAUGHT stabs means that multiple exceptions
|
||||
can be caught here. If Desc is 0, it means all exceptions are caught
|
||||
here. */
|
||||
__define_stab (N_CATCH, 0x54, "CATCH")
|
||||
|
||||
/* Structure or union element. Value is offset in the structure. */
|
||||
__define_stab (N_SSYM, 0x60, "SSYM")
|
||||
|
||||
/* Solaris2: Last stab emitted for module. */
|
||||
__define_stab (N_ENDM, 0x62, "ENDM")
|
||||
|
||||
/* Name of main source file.
|
||||
Value is starting text address of the compilation.
|
||||
If multiple N_SO's appear, the first to contain a trailing / is the
|
||||
compilation directory. The first to not contain a trailing / is the
|
||||
source file name, relative to the compilation directory. Others (perhaps
|
||||
resulting from cfront) are ignored.
|
||||
On Solaris2, value is undefined, but desc is a source-language code. */
|
||||
|
||||
__define_stab (N_SO, 0x64, "SO")
|
||||
|
||||
/* SunPro F77: Name of alias. */
|
||||
__define_stab (N_ALIAS, 0x6c, "ALIAS")
|
||||
|
||||
/* Automatic variable in the stack. Value is offset from frame pointer.
|
||||
Also used for type descriptions. */
|
||||
__define_stab (N_LSYM, 0x80, "LSYM")
|
||||
|
||||
/* Beginning of an include file. Only Sun uses this.
|
||||
In an object file, only the name is significant.
|
||||
The Sun linker puts data into some of the other fields. */
|
||||
__define_stab (N_BINCL, 0x82, "BINCL")
|
||||
|
||||
/* Name of sub-source file (#include file).
|
||||
Value is starting text address of the compilation. */
|
||||
__define_stab (N_SOL, 0x84, "SOL")
|
||||
|
||||
/* Parameter variable. Value is offset from argument pointer.
|
||||
(On most machines the argument pointer is the same as the frame pointer. */
|
||||
__define_stab (N_PSYM, 0xa0, "PSYM")
|
||||
|
||||
/* End of an include file. No name.
|
||||
This and N_BINCL act as brackets around the file's output.
|
||||
In an object file, there is no significant data in this entry.
|
||||
The Sun linker puts data into some of the fields. */
|
||||
__define_stab (N_EINCL, 0xa2, "EINCL")
|
||||
|
||||
/* Alternate entry point. Value is its address. */
|
||||
__define_stab (N_ENTRY, 0xa4, "ENTRY")
|
||||
|
||||
/* Beginning of lexical block.
|
||||
The desc is the nesting level in lexical blocks.
|
||||
The value is the address of the start of the text for the block.
|
||||
The variables declared inside the block *precede* the N_LBRAC symbol.
|
||||
On Solaris2, the value is relative to the start of the current function. */
|
||||
__define_stab (N_LBRAC, 0xc0, "LBRAC")
|
||||
|
||||
/* Place holder for deleted include file. Replaces a N_BINCL and everything
|
||||
up to the corresponding N_EINCL. The Sun linker generates these when
|
||||
it finds multiple identical copies of the symbols from an include file.
|
||||
This appears only in output from the Sun linker. */
|
||||
__define_stab (N_EXCL, 0xc2, "EXCL")
|
||||
|
||||
/* Modula-2 scope information. Can someone say what info it contains? */
|
||||
__define_stab (N_SCOPE, 0xc4, "SCOPE")
|
||||
|
||||
/* Solaris2: Patch Run Time Checker. */
|
||||
__define_stab (N_PATCH, 0xd0, "PATCH")
|
||||
|
||||
/* End of a lexical block. Desc matches the N_LBRAC's desc.
|
||||
The value is the address of the end of the text for the block.
|
||||
On Solaris2, the value is relative to the start of the current function. */
|
||||
__define_stab (N_RBRAC, 0xe0, "RBRAC")
|
||||
|
||||
/* Begin named common block. Only the name is significant. */
|
||||
__define_stab (N_BCOMM, 0xe2, "BCOMM")
|
||||
|
||||
/* End named common block. Only the name is significant
|
||||
(and it should match the N_BCOMM). */
|
||||
__define_stab (N_ECOMM, 0xe4, "ECOMM")
|
||||
|
||||
/* Member of a common block; value is offset within the common block.
|
||||
This should occur within a BCOMM/ECOMM pair. */
|
||||
__define_stab (N_ECOML, 0xe8, "ECOML")
|
||||
|
||||
/* Solaris2: Pascal "with" statement: type,,0,0,offset */
|
||||
__define_stab (N_WITH, 0xea, "WITH")
|
||||
|
||||
/* These STAB's are used on Gould systems for Non-Base register symbols
|
||||
or something like that. FIXME. I have assigned the values at random
|
||||
since I don't have a Gould here. Fixups from Gould folk welcome... */
|
||||
__define_stab (N_NBTEXT, 0xF0, "NBTEXT")
|
||||
__define_stab (N_NBDATA, 0xF2, "NBDATA")
|
||||
__define_stab (N_NBBSS, 0xF4, "NBBSS")
|
||||
__define_stab (N_NBSTS, 0xF6, "NBSTS")
|
||||
__define_stab (N_NBLCS, 0xF8, "NBLCS")
|
||||
|
||||
/* Second symbol entry containing a length-value for the preceding entry.
|
||||
The value is the length. */
|
||||
__define_stab (N_LENG, 0xfe, "LENG")
|
||||
|
||||
/* The above information, in matrix format.
|
||||
|
||||
STAB MATRIX
|
||||
_________________________________________________
|
||||
| 00 - 1F are not dbx stab symbols |
|
||||
| In most cases, the low bit is the EXTernal bit|
|
||||
|
||||
| 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA |
|
||||
| 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT |
|
||||
|
||||
| 08 BSS | 0A INDR | 0C FN_SEQ | 0E WEAKA |
|
||||
| 09 |EXT | 0B | 0D WEAKU | 0F WEAKT |
|
||||
|
||||
| 10 WEAKD | 12 COMM | 14 SETA | 16 SETT |
|
||||
| 11 WEAKB | 13 | 15 | 17 |
|
||||
|
||||
| 18 SETD | 1A SETB | 1C SETV | 1E WARNING|
|
||||
| 19 | 1B | 1D | 1F FN |
|
||||
|
||||
|_______________________________________________|
|
||||
| Debug entries with bit 01 set are unused. |
|
||||
| 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM |
|
||||
| 28 LCSYM | 2A MAIN | 2C ROSYM | 2E |
|
||||
| 30 PC | 32 NSYMS | 34 NOMAP | 36 |
|
||||
| 38 OBJ | 3A | 3C OPT | 3E |
|
||||
| 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE |
|
||||
| 48 BSLINE*| 4A DEFD | 4C FLINE | 4E |
|
||||
| 50 EHDECL*| 52 | 54 CATCH | 56 |
|
||||
| 58 | 5A | 5C | 5E |
|
||||
| 60 SSYM | 62 ENDM | 64 SO | 66 |
|
||||
| 68 | 6A | 6C ALIAS | 6E |
|
||||
| 70 | 72 | 74 | 76 |
|
||||
| 78 | 7A | 7C | 7E |
|
||||
| 80 LSYM | 82 BINCL | 84 SOL | 86 |
|
||||
| 88 | 8A | 8C | 8E |
|
||||
| 90 | 92 | 94 | 96 |
|
||||
| 98 | 9A | 9C | 9E |
|
||||
| A0 PSYM | A2 EINCL | A4 ENTRY | A6 |
|
||||
| A8 | AA | AC | AE |
|
||||
| B0 | B2 | B4 | B6 |
|
||||
| B8 | BA | BC | BE |
|
||||
| C0 LBRAC | C2 EXCL | C4 SCOPE | C6 |
|
||||
| C8 | CA | CC | CE |
|
||||
| D0 PATCH | D2 | D4 | D6 |
|
||||
| D8 | DA | DC | DE |
|
||||
| E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 |
|
||||
| E8 ECOML | EA WITH | EC | EE |
|
||||
| F0 | F2 | F4 | F6 |
|
||||
| F8 | FA | FC | FE LENG |
|
||||
+-----------------------------------------------+
|
||||
* 50 EHDECL is also MOD2.
|
||||
* 48 BSLINE is also BROWS.
|
||||
*/
|
||||
@@ -1,54 +0,0 @@
|
||||
/* gnu_stab.h Definitions for GNU extensions to STABS
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
#ifndef __GNU_STAB__
|
||||
|
||||
/* Indicate the GNU stab.h is in use. */
|
||||
|
||||
#define __GNU_STAB__
|
||||
|
||||
#define __define_stab(NAME, CODE, STRING) NAME=CODE,
|
||||
#define __define_stab_duplicate(NAME, CODE, STRING) NAME=CODE,
|
||||
|
||||
enum __stab_debug_code
|
||||
{
|
||||
#include "aout/stab.def"
|
||||
LAST_UNUSED_STAB_CODE
|
||||
};
|
||||
|
||||
#undef __define_stab
|
||||
|
||||
/* Definitions of "desc" field for N_SO stabs in Solaris2. */
|
||||
|
||||
#define N_SO_AS 1
|
||||
#define N_SO_C 2
|
||||
#define N_SO_ANSI_C 3
|
||||
#define N_SO_CC 4 /* C++ */
|
||||
#define N_SO_FORTRAN 5
|
||||
#define N_SO_PASCAL 6
|
||||
|
||||
/* Solaris2: Floating point type values in basic types. */
|
||||
|
||||
#define NF_NONE 0
|
||||
#define NF_SINGLE 1 /* IEEE 32-bit */
|
||||
#define NF_DOUBLE 2 /* IEEE 64-bit */
|
||||
#define NF_COMPLEX 3 /* Fortran complex */
|
||||
#define NF_COMPLEX16 4 /* Fortran double complex */
|
||||
#define NF_COMPLEX32 5 /* Fortran complex*16 */
|
||||
#define NF_LDOUBLE 6 /* Long double (whatever that is) */
|
||||
|
||||
#endif /* __GNU_STAB_ */
|
||||
@@ -1,235 +0,0 @@
|
||||
/* SPARC-specific values for a.out files
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Some systems, e.g., AIX, may have defined this in header files already
|
||||
included. */
|
||||
#undef TARGET_PAGE_SIZE
|
||||
#define TARGET_PAGE_SIZE 0x2000 /* 8K. aka NBPG in <sys/param.h> */
|
||||
/* Note that some SPARCs have 4K pages, some 8K, some others. */
|
||||
|
||||
#define SEG_SIZE_SPARC TARGET_PAGE_SIZE
|
||||
#define SEG_SIZE_SUN3 0x20000 /* Resolution of r/w protection hw */
|
||||
|
||||
#define TEXT_START_ADDR TARGET_PAGE_SIZE /* Location 0 is not accessible */
|
||||
#define N_HEADER_IN_TEXT(x) 1
|
||||
|
||||
/* Non-default definitions of the accessor macros... */
|
||||
|
||||
/* Segment size varies on Sun-3 versus Sun-4. */
|
||||
|
||||
#define N_SEGSIZE(x) (N_MACHTYPE(x) == M_SPARC? SEG_SIZE_SPARC: \
|
||||
N_MACHTYPE(x) == M_68020? SEG_SIZE_SUN3: \
|
||||
/* Guess? */ TARGET_PAGE_SIZE)
|
||||
|
||||
/* Virtual Address of text segment from the a.out file. For OMAGIC,
|
||||
(almost always "unlinked .o's" these days), should be zero.
|
||||
Sun added a kludge so that shared libraries linked ZMAGIC get
|
||||
an address of zero if a_entry (!!!) is lower than the otherwise
|
||||
expected text address. These kludges have gotta go!
|
||||
For linked files, should reflect reality if we know it. */
|
||||
|
||||
/* This differs from the version in aout64.h (which we override by defining
|
||||
it here) only for NMAGIC (we return TEXT_START_ADDR+EXEC_BYTES_SIZE;
|
||||
they return 0). */
|
||||
|
||||
#define N_TXTADDR(x) \
|
||||
(N_MAGIC(x)==OMAGIC? 0 \
|
||||
: (N_MAGIC(x) == ZMAGIC && (x).a_entry < TEXT_START_ADDR)? 0 \
|
||||
: TEXT_START_ADDR+EXEC_BYTES_SIZE)
|
||||
|
||||
/* When a file is linked against a shared library on SunOS 4, the
|
||||
dynamic bit in the exec header is set, and the first symbol in the
|
||||
symbol table is __DYNAMIC. Its value is the address of the
|
||||
following structure. */
|
||||
|
||||
struct external_sun4_dynamic
|
||||
{
|
||||
/* The version number of the structure. SunOS 4.1.x creates files
|
||||
with version number 3, which is what this structure is based on.
|
||||
According to gdb, version 2 is similar. I believe that version 2
|
||||
used a different type of procedure linkage table, and there may
|
||||
have been other differences. */
|
||||
bfd_byte ld_version[4];
|
||||
/* The virtual address of a 28 byte structure used in debugging.
|
||||
The contents are filled in at run time by ld.so. */
|
||||
bfd_byte ldd[4];
|
||||
/* The virtual address of another structure with information about
|
||||
how to relocate the executable at run time. */
|
||||
bfd_byte ld[4];
|
||||
};
|
||||
|
||||
/* The size of the debugging structure pointed to by the debugger
|
||||
field of __DYNAMIC. */
|
||||
#define EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE (24)
|
||||
|
||||
/* The structure pointed to by the linker field of __DYNAMIC. As far
|
||||
as I can tell, most of the addresses in this structure are offsets
|
||||
within the file, but some are actually virtual addresses. */
|
||||
|
||||
struct internal_sun4_dynamic_link
|
||||
{
|
||||
/* Linked list of loaded objects. This is filled in at runtime by
|
||||
ld.so and probably by dlopen. */
|
||||
unsigned long ld_loaded;
|
||||
|
||||
/* The address of the list of names of shared objects which must be
|
||||
included at runtime. Each entry in the list is 16 bytes: the 4
|
||||
byte address of the string naming the object (e.g., for -lc this
|
||||
is "c"); 4 bytes of flags--the high bit is whether to search for
|
||||
the object using the library path; the 2 byte major version
|
||||
number; the 2 byte minor version number; the 4 byte address of
|
||||
the next entry in the list (zero if this is the last entry). The
|
||||
version numbers seem to only be non-zero when doing library
|
||||
searching. */
|
||||
unsigned long ld_need;
|
||||
|
||||
/* The address of the path to search for the shared objects which
|
||||
must be included. This points to a string in PATH format which
|
||||
is generated from the -L arguments to the linker. According to
|
||||
the man page, ld.so implicitly adds ${LD_LIBRARY_PATH} to the
|
||||
beginning of this string and /lib:/usr/lib:/usr/local/lib to the
|
||||
end. The string is terminated by a null byte. This field is
|
||||
zero if there is no additional path. */
|
||||
unsigned long ld_rules;
|
||||
|
||||
/* The address of the global offset table. This appears to be a
|
||||
virtual address, not a file offset. The first entry in the
|
||||
global offset table seems to be the virtual address of the
|
||||
sun4_dynamic structure (the same value as the __DYNAMIC symbol).
|
||||
The global offset table is used for PIC code to hold the
|
||||
addresses of variables. A dynamically linked file which does not
|
||||
itself contain PIC code has a four byte global offset table. */
|
||||
unsigned long ld_got;
|
||||
|
||||
/* The address of the procedure linkage table. This appears to be a
|
||||
virtual address, not a file offset.
|
||||
|
||||
On a SPARC, the table is composed of 12 byte entries, each of
|
||||
which consists of three instructions. The first entry is
|
||||
sethi %hi(0),%g1
|
||||
jmp %g1
|
||||
nop
|
||||
These instructions are changed by ld.so into a jump directly into
|
||||
ld.so itself. Each subsequent entry is
|
||||
save %sp, -96, %sp
|
||||
call <address of first entry in procedure linkage table>
|
||||
<reloc_number | 0x01000000>
|
||||
The reloc_number is the number of the reloc to use to resolve
|
||||
this entry. The reloc will be a JMP_SLOT reloc against some
|
||||
symbol that is not defined in this object file but should be
|
||||
defined in a shared object (if it is not, ld.so will report a
|
||||
runtime error and exit). The constant 0x010000000 turns the
|
||||
reloc number into a sethi of %g0, which does nothing since %g0 is
|
||||
hardwired to zero.
|
||||
|
||||
When one of these entries is executed, it winds up calling into
|
||||
ld.so. ld.so looks at the reloc number, available via the return
|
||||
address, to determine which entry this is. It then looks at the
|
||||
reloc and patches up the entry in the table into a sethi and jmp
|
||||
to the real address followed by a nop. This means that the reloc
|
||||
lookup only has to happen once, and it also means that the
|
||||
relocation only needs to be done if the function is actually
|
||||
called. The relocation is expensive because ld.so must look up
|
||||
the symbol by name.
|
||||
|
||||
The size of the procedure linkage table is given by the ld_plt_sz
|
||||
field. */
|
||||
unsigned long ld_plt;
|
||||
|
||||
/* The address of the relocs. These are in the same format as
|
||||
ordinary relocs. Symbol index numbers refer to the symbols
|
||||
pointed to by ld_stab. I think the only way to determine the
|
||||
number of relocs is to assume that all the bytes from ld_rel to
|
||||
ld_hash contain reloc entries. */
|
||||
unsigned long ld_rel;
|
||||
|
||||
/* The address of a hash table of symbols. The hash table has
|
||||
roughly the same number of entries as there are dynamic symbols;
|
||||
I think the only way to get the exact size is to assume that
|
||||
every byte from ld_hash to ld_stab is devoted to the hash table.
|
||||
|
||||
Each entry in the hash table is eight bytes. The first four
|
||||
bytes are a symbol index into the dynamic symbols. The second
|
||||
four bytes are the index of the next hash table entry in the
|
||||
bucket. The ld_buckets field gives the number of buckets, say B.
|
||||
The first B entries in the hash table each start a bucket which
|
||||
is chained through the second four bytes of each entry. A value
|
||||
of zero ends the chain.
|
||||
|
||||
The hash function is simply
|
||||
h = 0;
|
||||
while (*string != '\0')
|
||||
h = (h << 1) + *string++;
|
||||
h &= 0x7fffffff;
|
||||
|
||||
To look up a symbol, compute the hash value of the name. Take
|
||||
the modulos of hash value and the number of buckets. Start at
|
||||
that entry in the hash table. See if the symbol (from the first
|
||||
four bytes of the hash table entry) has the name you are looking
|
||||
for. If not, use the chain field (the second four bytes of the
|
||||
hash table entry) to move on to the next entry in this bucket.
|
||||
If the chain field is zero you have reached the end of the
|
||||
bucket, and the symbol is not in the hash table. */
|
||||
unsigned long ld_hash;
|
||||
|
||||
/* The address of the symbol table. This is a list of
|
||||
external_nlist structures. The string indices are relative to
|
||||
the ld_symbols field. I think the only way to determine the
|
||||
number of symbols is to assume that all the bytes between ld_stab
|
||||
and ld_symbols are external_nlist structures. */
|
||||
unsigned long ld_stab;
|
||||
|
||||
/* I don't know what this is for. It seems to always be zero. */
|
||||
unsigned long ld_stab_hash;
|
||||
|
||||
/* The number of buckets in the hash table. */
|
||||
unsigned long ld_buckets;
|
||||
|
||||
/* The address of the symbol string table. The first string in this
|
||||
string table need not be the empty string. */
|
||||
unsigned long ld_symbols;
|
||||
|
||||
/* The size in bytes of the symbol string table. */
|
||||
unsigned long ld_symb_size;
|
||||
|
||||
/* The size in bytes of the text segment. */
|
||||
unsigned long ld_text;
|
||||
|
||||
/* The size in bytes of the procedure linkage table. */
|
||||
unsigned long ld_plt_sz;
|
||||
};
|
||||
|
||||
/* The external form of the structure. */
|
||||
|
||||
struct external_sun4_dynamic_link
|
||||
{
|
||||
bfd_byte ld_loaded[4];
|
||||
bfd_byte ld_need[4];
|
||||
bfd_byte ld_rules[4];
|
||||
bfd_byte ld_got[4];
|
||||
bfd_byte ld_plt[4];
|
||||
bfd_byte ld_rel[4];
|
||||
bfd_byte ld_hash[4];
|
||||
bfd_byte ld_stab[4];
|
||||
bfd_byte ld_stab_hash[4];
|
||||
bfd_byte ld_buckets[4];
|
||||
bfd_byte ld_symbols[4];
|
||||
bfd_byte ld_symb_size[4];
|
||||
bfd_byte ld_text[4];
|
||||
bfd_byte ld_plt_sz[4];
|
||||
};
|
||||
@@ -1,724 +0,0 @@
|
||||
/* bfdlink.h -- header file for BFD link routines
|
||||
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef BFDLINK_H
|
||||
#define BFDLINK_H
|
||||
|
||||
/* Which symbols to strip during a link. */
|
||||
enum bfd_link_strip
|
||||
{
|
||||
strip_none, /* Don't strip any symbols. */
|
||||
strip_debugger, /* Strip debugging symbols. */
|
||||
strip_some, /* keep_hash is the list of symbols to keep. */
|
||||
strip_all /* Strip all symbols. */
|
||||
};
|
||||
|
||||
/* Which local symbols to discard during a link. This is irrelevant
|
||||
if strip_all is used. */
|
||||
enum bfd_link_discard
|
||||
{
|
||||
discard_sec_merge, /* Discard local temporary symbols in SEC_MERGE
|
||||
sections. */
|
||||
discard_none, /* Don't discard any locals. */
|
||||
discard_l, /* Discard local temporary symbols. */
|
||||
discard_all /* Discard all locals. */
|
||||
};
|
||||
|
||||
/* Describes the type of hash table entry structure being used.
|
||||
Different hash table structure have different fields and so
|
||||
support different linking features. */
|
||||
enum bfd_link_hash_table_type
|
||||
{
|
||||
bfd_link_generic_hash_table,
|
||||
bfd_link_elf_hash_table
|
||||
};
|
||||
|
||||
/* These are the possible types of an entry in the BFD link hash
|
||||
table. */
|
||||
|
||||
enum bfd_link_hash_type
|
||||
{
|
||||
bfd_link_hash_new, /* Symbol is new. */
|
||||
bfd_link_hash_undefined, /* Symbol seen before, but undefined. */
|
||||
bfd_link_hash_undefweak, /* Symbol is weak and undefined. */
|
||||
bfd_link_hash_defined, /* Symbol is defined. */
|
||||
bfd_link_hash_defweak, /* Symbol is weak and defined. */
|
||||
bfd_link_hash_common, /* Symbol is common. */
|
||||
bfd_link_hash_indirect, /* Symbol is an indirect link. */
|
||||
bfd_link_hash_warning /* Like indirect, but warn if referenced. */
|
||||
};
|
||||
|
||||
enum bfd_link_common_skip_ar_aymbols
|
||||
{
|
||||
bfd_link_common_skip_none,
|
||||
bfd_link_common_skip_text,
|
||||
bfd_link_common_skip_data,
|
||||
bfd_link_common_skip_all
|
||||
};
|
||||
|
||||
/* The linking routines use a hash table which uses this structure for
|
||||
its elements. */
|
||||
|
||||
struct bfd_link_hash_entry
|
||||
{
|
||||
/* Base hash table entry structure. */
|
||||
struct bfd_hash_entry root;
|
||||
|
||||
/* Type of this entry. */
|
||||
enum bfd_link_hash_type type;
|
||||
|
||||
/* A union of information depending upon the type. */
|
||||
union
|
||||
{
|
||||
/* Nothing is kept for bfd_hash_new. */
|
||||
/* bfd_link_hash_undefined, bfd_link_hash_undefweak. */
|
||||
struct
|
||||
{
|
||||
/* Undefined and common symbols are kept in a linked list through
|
||||
this field. This field is present in all of the union element
|
||||
so that we don't need to remove entries from the list when we
|
||||
change their type. Removing entries would either require the
|
||||
list to be doubly linked, which would waste more memory, or
|
||||
require a traversal. When an undefined or common symbol is
|
||||
created, it should be added to this list, the head of which is in
|
||||
the link hash table itself. As symbols are defined, they need
|
||||
not be removed from the list; anything which reads the list must
|
||||
doublecheck the symbol type.
|
||||
|
||||
Weak symbols are not kept on this list.
|
||||
|
||||
Defined and defweak symbols use this field as a reference marker.
|
||||
If the field is not NULL, or this structure is the tail of the
|
||||
undefined symbol list, the symbol has been referenced. If the
|
||||
symbol is undefined and becomes defined, this field will
|
||||
automatically be non-NULL since the symbol will have been on the
|
||||
undefined symbol list. */
|
||||
struct bfd_link_hash_entry *next;
|
||||
bfd *abfd; /* BFD symbol was found in. */
|
||||
bfd *weak; /* BFD weak symbol was found in. */
|
||||
} undef;
|
||||
/* bfd_link_hash_defined, bfd_link_hash_defweak. */
|
||||
struct
|
||||
{
|
||||
struct bfd_link_hash_entry *next;
|
||||
asection *section; /* Symbol section. */
|
||||
bfd_vma value; /* Symbol value. */
|
||||
} def;
|
||||
/* bfd_link_hash_indirect, bfd_link_hash_warning. */
|
||||
struct
|
||||
{
|
||||
struct bfd_link_hash_entry *next;
|
||||
struct bfd_link_hash_entry *link; /* Real symbol. */
|
||||
const char *warning; /* Warning (bfd_link_hash_warning only). */
|
||||
} i;
|
||||
/* bfd_link_hash_common. */
|
||||
struct
|
||||
{
|
||||
struct bfd_link_hash_entry *next;
|
||||
/* The linker needs to know three things about common
|
||||
symbols: the size, the alignment, and the section in
|
||||
which the symbol should be placed. We store the size
|
||||
here, and we allocate a small structure to hold the
|
||||
section and the alignment. The alignment is stored as a
|
||||
power of two. We don't store all the information
|
||||
directly because we don't want to increase the size of
|
||||
the union; this structure is a major space user in the
|
||||
linker. */
|
||||
struct bfd_link_hash_common_entry
|
||||
{
|
||||
unsigned int alignment_power; /* Alignment. */
|
||||
asection *section; /* Symbol section. */
|
||||
} *p;
|
||||
bfd_size_type size; /* Common symbol size. */
|
||||
} c;
|
||||
} u;
|
||||
};
|
||||
|
||||
/* This is the link hash table. It is a derived class of
|
||||
bfd_hash_table. */
|
||||
|
||||
struct bfd_link_hash_table
|
||||
{
|
||||
/* The hash table itself. */
|
||||
struct bfd_hash_table table;
|
||||
/* The back end which created this hash table. This indicates the
|
||||
type of the entries in the hash table, which is sometimes
|
||||
important information when linking object files of different
|
||||
types together. */
|
||||
const bfd_target *creator;
|
||||
/* A linked list of undefined and common symbols, linked through the
|
||||
next field in the bfd_link_hash_entry structure. */
|
||||
struct bfd_link_hash_entry *undefs;
|
||||
/* Entries are added to the tail of the undefs list. */
|
||||
struct bfd_link_hash_entry *undefs_tail;
|
||||
/* The type of the link hash table. */
|
||||
enum bfd_link_hash_table_type type;
|
||||
};
|
||||
|
||||
/* Look up an entry in a link hash table. If FOLLOW is TRUE, this
|
||||
follows bfd_link_hash_indirect and bfd_link_hash_warning links to
|
||||
the real symbol. */
|
||||
extern struct bfd_link_hash_entry *bfd_link_hash_lookup
|
||||
(struct bfd_link_hash_table *, const char *, bfd_boolean create,
|
||||
bfd_boolean copy, bfd_boolean follow);
|
||||
|
||||
/* Look up an entry in the main linker hash table if the symbol might
|
||||
be wrapped. This should only be used for references to an
|
||||
undefined symbol, not for definitions of a symbol. */
|
||||
|
||||
extern struct bfd_link_hash_entry *bfd_wrapped_link_hash_lookup
|
||||
(bfd *, struct bfd_link_info *, const char *, bfd_boolean,
|
||||
bfd_boolean, bfd_boolean);
|
||||
|
||||
/* Traverse a link hash table. */
|
||||
extern void bfd_link_hash_traverse
|
||||
(struct bfd_link_hash_table *,
|
||||
bfd_boolean (*) (struct bfd_link_hash_entry *, void *),
|
||||
void *);
|
||||
|
||||
/* Add an entry to the undefs list. */
|
||||
extern void bfd_link_add_undef
|
||||
(struct bfd_link_hash_table *, struct bfd_link_hash_entry *);
|
||||
|
||||
/* Remove symbols from the undefs list that don't belong there. */
|
||||
extern void bfd_link_repair_undef_list
|
||||
(struct bfd_link_hash_table *table);
|
||||
|
||||
struct bfd_sym_chain
|
||||
{
|
||||
struct bfd_sym_chain *next;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
/* How to handle unresolved symbols.
|
||||
There are four possibilities which are enumerated below: */
|
||||
enum report_method
|
||||
{
|
||||
/* This is the initial value when then link_info structure is created.
|
||||
It allows the various stages of the linker to determine whether they
|
||||
allowed to set the value. */
|
||||
RM_NOT_YET_SET = 0,
|
||||
RM_IGNORE,
|
||||
RM_GENERATE_WARNING,
|
||||
RM_GENERATE_ERROR
|
||||
};
|
||||
|
||||
/* This structure holds all the information needed to communicate
|
||||
between BFD and the linker when doing a link. */
|
||||
|
||||
struct bfd_link_info
|
||||
{
|
||||
/* TRUE if BFD should generate a relocatable object file. */
|
||||
unsigned int relocatable: 1;
|
||||
|
||||
/* TRUE if BFD should generate relocation information in the final
|
||||
executable. */
|
||||
unsigned int emitrelocations: 1;
|
||||
|
||||
/* TRUE if BFD should generate a "task linked" object file,
|
||||
similar to relocatable but also with globals converted to
|
||||
statics. */
|
||||
unsigned int task_link: 1;
|
||||
|
||||
/* TRUE if BFD should generate a shared object. */
|
||||
unsigned int shared: 1;
|
||||
|
||||
/* TRUE if BFD should pre-bind symbols in a shared object. */
|
||||
unsigned int symbolic: 1;
|
||||
|
||||
/* TRUE if BFD should export all symbols in the dynamic symbol table
|
||||
of an executable, rather than only those used. */
|
||||
unsigned int export_dynamic: 1;
|
||||
|
||||
/* TRUE if shared objects should be linked directly, not shared. */
|
||||
unsigned int static_link: 1;
|
||||
|
||||
/* TRUE if the output file should be in a traditional format. This
|
||||
is equivalent to the setting of the BFD_TRADITIONAL_FORMAT flag
|
||||
on the output file, but may be checked when reading the input
|
||||
files. */
|
||||
unsigned int traditional_format: 1;
|
||||
|
||||
/* TRUE if we want to produced optimized output files. This might
|
||||
need much more time and therefore must be explicitly selected. */
|
||||
unsigned int optimize: 1;
|
||||
|
||||
/* TRUE if ok to have multiple definition. */
|
||||
unsigned int allow_multiple_definition: 1;
|
||||
|
||||
/* TRUE if ok to have version with no definition. */
|
||||
unsigned int allow_undefined_version: 1;
|
||||
|
||||
/* TRUE if a default symbol version should be created and used for
|
||||
exported symbols. */
|
||||
unsigned int create_default_symver: 1;
|
||||
|
||||
/* TRUE if a default symbol version should be created and used for
|
||||
imported symbols. */
|
||||
unsigned int default_imported_symver: 1;
|
||||
|
||||
/* TRUE if symbols should be retained in memory, FALSE if they
|
||||
should be freed and reread. */
|
||||
unsigned int keep_memory: 1;
|
||||
|
||||
/* TRUE if every symbol should be reported back via the notice
|
||||
callback. */
|
||||
unsigned int notice_all: 1;
|
||||
|
||||
/* TRUE if executable should not contain copy relocs.
|
||||
Setting this true may result in a non-sharable text segment. */
|
||||
unsigned int nocopyreloc: 1;
|
||||
|
||||
/* TRUE if the new ELF dynamic tags are enabled. */
|
||||
unsigned int new_dtags: 1;
|
||||
|
||||
/* TRUE if non-PLT relocs should be merged into one reloc section
|
||||
and sorted so that relocs against the same symbol come together. */
|
||||
unsigned int combreloc: 1;
|
||||
|
||||
/* TRUE if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment
|
||||
should be created. */
|
||||
unsigned int eh_frame_hdr: 1;
|
||||
|
||||
/* TRUE if global symbols in discarded sections should be stripped. */
|
||||
unsigned int strip_discarded: 1;
|
||||
|
||||
/* TRUE if generating a position independent executable. */
|
||||
unsigned int pie: 1;
|
||||
|
||||
/* TRUE if generating an executable, position independent or not. */
|
||||
unsigned int executable : 1;
|
||||
|
||||
/* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W|PF_X
|
||||
flags. */
|
||||
unsigned int execstack: 1;
|
||||
|
||||
/* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W
|
||||
flags. */
|
||||
unsigned int noexecstack: 1;
|
||||
|
||||
/* TRUE if PT_GNU_RELRO segment should be created. */
|
||||
unsigned int relro: 1;
|
||||
|
||||
/* TRUE if we should warn when adding a DT_TEXTREL to a shared object. */
|
||||
unsigned int warn_shared_textrel: 1;
|
||||
|
||||
/* TRUE if unreferenced sections should be removed. */
|
||||
unsigned int gc_sections: 1;
|
||||
|
||||
/* TRUE if .hash section should be created. */
|
||||
unsigned int emit_hash: 1;
|
||||
|
||||
/* TRUE if .gnu.hash section should be created. */
|
||||
unsigned int emit_gnu_hash: 1;
|
||||
|
||||
/* What to do with unresolved symbols in an object file.
|
||||
When producing executables the default is GENERATE_ERROR.
|
||||
When producing shared libraries the default is IGNORE. The
|
||||
assumption with shared libraries is that the reference will be
|
||||
resolved at load/execution time. */
|
||||
enum report_method unresolved_syms_in_objects;
|
||||
|
||||
/* What to do with unresolved symbols in a shared library.
|
||||
The same defaults apply. */
|
||||
enum report_method unresolved_syms_in_shared_libs;
|
||||
|
||||
/* Which symbols to strip. */
|
||||
enum bfd_link_strip strip;
|
||||
|
||||
/* Which local symbols to discard. */
|
||||
enum bfd_link_discard discard;
|
||||
|
||||
/* Criteria for skipping symbols when detemining
|
||||
whether to include an object from an archive. */
|
||||
enum bfd_link_common_skip_ar_aymbols common_skip_ar_aymbols;
|
||||
|
||||
/* Char that may appear as the first char of a symbol, but should be
|
||||
skipped (like symbol_leading_char) when looking up symbols in
|
||||
wrap_hash. Used by PowerPC Linux for 'dot' symbols. */
|
||||
char wrap_char;
|
||||
|
||||
/* Function callbacks. */
|
||||
const struct bfd_link_callbacks *callbacks;
|
||||
|
||||
/* Hash table handled by BFD. */
|
||||
struct bfd_link_hash_table *hash;
|
||||
|
||||
/* Hash table of symbols to keep. This is NULL unless strip is
|
||||
strip_some. */
|
||||
struct bfd_hash_table *keep_hash;
|
||||
|
||||
/* Hash table of symbols to report back via the notice callback. If
|
||||
this is NULL, and notice_all is FALSE, then no symbols are
|
||||
reported back. */
|
||||
struct bfd_hash_table *notice_hash;
|
||||
|
||||
/* Hash table of symbols which are being wrapped (the --wrap linker
|
||||
option). If this is NULL, no symbols are being wrapped. */
|
||||
struct bfd_hash_table *wrap_hash;
|
||||
|
||||
/* The list of input BFD's involved in the link. These are chained
|
||||
together via the link_next field. */
|
||||
bfd *input_bfds;
|
||||
|
||||
/* If a symbol should be created for each input BFD, this is section
|
||||
where those symbols should be placed. It must be a section in
|
||||
the output BFD. It may be NULL, in which case no such symbols
|
||||
will be created. This is to support CREATE_OBJECT_SYMBOLS in the
|
||||
linker command language. */
|
||||
asection *create_object_symbols_section;
|
||||
|
||||
/* List of global symbol names that are starting points for marking
|
||||
sections against garbage collection. */
|
||||
struct bfd_sym_chain *gc_sym_list;
|
||||
|
||||
/* If a base output file is wanted, then this points to it */
|
||||
void *base_file;
|
||||
|
||||
/* The function to call when the executable or shared object is
|
||||
loaded. */
|
||||
const char *init_function;
|
||||
|
||||
/* The function to call when the executable or shared object is
|
||||
unloaded. */
|
||||
const char *fini_function;
|
||||
|
||||
/* Number of relaxation passes. Usually only one relaxation pass
|
||||
is needed. But a backend can have as many relaxation passes as
|
||||
necessary. During bfd_relax_section call, it is set to the
|
||||
current pass, starting from 0. */
|
||||
int relax_pass;
|
||||
|
||||
/* Non-zero if auto-import thunks for DATA items in pei386 DLLs
|
||||
should be generated/linked against. Set to 1 if this feature
|
||||
is explicitly requested by the user, -1 if enabled by default. */
|
||||
int pei386_auto_import;
|
||||
|
||||
/* Non-zero if runtime relocs for DATA items with non-zero addends
|
||||
in pei386 DLLs should be generated. Set to 1 if this feature
|
||||
is explicitly requested by the user, -1 if enabled by default. */
|
||||
int pei386_runtime_pseudo_reloc;
|
||||
|
||||
/* How many spare .dynamic DT_NULL entries should be added? */
|
||||
unsigned int spare_dynamic_tags;
|
||||
|
||||
/* May be used to set DT_FLAGS for ELF. */
|
||||
bfd_vma flags;
|
||||
|
||||
/* May be used to set DT_FLAGS_1 for ELF. */
|
||||
bfd_vma flags_1;
|
||||
|
||||
/* Start and end of RELRO region. */
|
||||
bfd_vma relro_start, relro_end;
|
||||
};
|
||||
|
||||
/* This structures holds a set of callback functions. These are
|
||||
called by the BFD linker routines. Except for einfo, the first
|
||||
argument to each callback function is the bfd_link_info structure
|
||||
being used and each function returns a boolean value. If the
|
||||
function returns FALSE, then the BFD function which called it should
|
||||
return with a failure indication. */
|
||||
|
||||
struct bfd_link_callbacks
|
||||
{
|
||||
/* A function which is called when an object is added from an
|
||||
archive. ABFD is the archive element being added. NAME is the
|
||||
name of the symbol which caused the archive element to be pulled
|
||||
in. */
|
||||
bfd_boolean (*add_archive_element)
|
||||
(struct bfd_link_info *, bfd *abfd, const char *name);
|
||||
/* A function which is called when a symbol is found with multiple
|
||||
definitions. NAME is the symbol which is defined multiple times.
|
||||
OBFD is the old BFD, OSEC is the old section, OVAL is the old
|
||||
value, NBFD is the new BFD, NSEC is the new section, and NVAL is
|
||||
the new value. OBFD may be NULL. OSEC and NSEC may be
|
||||
bfd_com_section or bfd_ind_section. */
|
||||
bfd_boolean (*multiple_definition)
|
||||
(struct bfd_link_info *, const char *name,
|
||||
bfd *obfd, asection *osec, bfd_vma oval,
|
||||
bfd *nbfd, asection *nsec, bfd_vma nval);
|
||||
/* A function which is called when a common symbol is defined
|
||||
multiple times. NAME is the symbol appearing multiple times.
|
||||
OBFD is the BFD of the existing symbol; it may be NULL if this is
|
||||
not known. OTYPE is the type of the existing symbol, which may
|
||||
be bfd_link_hash_defined, bfd_link_hash_defweak,
|
||||
bfd_link_hash_common, or bfd_link_hash_indirect. If OTYPE is
|
||||
bfd_link_hash_common, OSIZE is the size of the existing symbol.
|
||||
NBFD is the BFD of the new symbol. NTYPE is the type of the new
|
||||
symbol, one of bfd_link_hash_defined, bfd_link_hash_common, or
|
||||
bfd_link_hash_indirect. If NTYPE is bfd_link_hash_common, NSIZE
|
||||
is the size of the new symbol. */
|
||||
bfd_boolean (*multiple_common)
|
||||
(struct bfd_link_info *, const char *name,
|
||||
bfd *obfd, enum bfd_link_hash_type otype, bfd_vma osize,
|
||||
bfd *nbfd, enum bfd_link_hash_type ntype, bfd_vma nsize);
|
||||
/* A function which is called to add a symbol to a set. ENTRY is
|
||||
the link hash table entry for the set itself (e.g.,
|
||||
__CTOR_LIST__). RELOC is the relocation to use for an entry in
|
||||
the set when generating a relocatable file, and is also used to
|
||||
get the size of the entry when generating an executable file.
|
||||
ABFD, SEC and VALUE identify the value to add to the set. */
|
||||
bfd_boolean (*add_to_set)
|
||||
(struct bfd_link_info *, struct bfd_link_hash_entry *entry,
|
||||
bfd_reloc_code_real_type reloc, bfd *abfd, asection *sec, bfd_vma value);
|
||||
/* A function which is called when the name of a g++ constructor or
|
||||
destructor is found. This is only called by some object file
|
||||
formats. CONSTRUCTOR is TRUE for a constructor, FALSE for a
|
||||
destructor. This will use BFD_RELOC_CTOR when generating a
|
||||
relocatable file. NAME is the name of the symbol found. ABFD,
|
||||
SECTION and VALUE are the value of the symbol. */
|
||||
bfd_boolean (*constructor)
|
||||
(struct bfd_link_info *, bfd_boolean constructor, const char *name,
|
||||
bfd *abfd, asection *sec, bfd_vma value);
|
||||
/* A function which is called to issue a linker warning. For
|
||||
example, this is called when there is a reference to a warning
|
||||
symbol. WARNING is the warning to be issued. SYMBOL is the name
|
||||
of the symbol which triggered the warning; it may be NULL if
|
||||
there is none. ABFD, SECTION and ADDRESS identify the location
|
||||
which trigerred the warning; either ABFD or SECTION or both may
|
||||
be NULL if the location is not known. */
|
||||
bfd_boolean (*warning)
|
||||
(struct bfd_link_info *, const char *warning, const char *symbol,
|
||||
bfd *abfd, asection *section, bfd_vma address);
|
||||
/* A function which is called when a relocation is attempted against
|
||||
an undefined symbol. NAME is the symbol which is undefined.
|
||||
ABFD, SECTION and ADDRESS identify the location from which the
|
||||
reference is made. FATAL indicates whether an undefined symbol is
|
||||
a fatal error or not. In some cases SECTION may be NULL. */
|
||||
bfd_boolean (*undefined_symbol)
|
||||
(struct bfd_link_info *, const char *name, bfd *abfd,
|
||||
asection *section, bfd_vma address, bfd_boolean fatal);
|
||||
/* A function which is called when a reloc overflow occurs. ENTRY is
|
||||
the link hash table entry for the symbol the reloc is against.
|
||||
NAME is the name of the local symbol or section the reloc is
|
||||
against, RELOC_NAME is the name of the relocation, and ADDEND is
|
||||
any addend that is used. ABFD, SECTION and ADDRESS identify the
|
||||
location at which the overflow occurs; if this is the result of a
|
||||
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
|
||||
ABFD will be NULL. */
|
||||
bfd_boolean (*reloc_overflow)
|
||||
(struct bfd_link_info *, struct bfd_link_hash_entry *entry,
|
||||
const char *name, const char *reloc_name, bfd_vma addend,
|
||||
bfd *abfd, asection *section, bfd_vma address);
|
||||
/* A function which is called when a dangerous reloc is performed.
|
||||
MESSAGE is an appropriate message.
|
||||
ABFD, SECTION and ADDRESS identify the location at which the
|
||||
problem occurred; if this is the result of a
|
||||
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
|
||||
ABFD will be NULL. */
|
||||
bfd_boolean (*reloc_dangerous)
|
||||
(struct bfd_link_info *, const char *message,
|
||||
bfd *abfd, asection *section, bfd_vma address);
|
||||
/* A function which is called when a reloc is found to be attached
|
||||
to a symbol which is not being written out. NAME is the name of
|
||||
the symbol. ABFD, SECTION and ADDRESS identify the location of
|
||||
the reloc; if this is the result of a
|
||||
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
|
||||
ABFD will be NULL. */
|
||||
bfd_boolean (*unattached_reloc)
|
||||
(struct bfd_link_info *, const char *name,
|
||||
bfd *abfd, asection *section, bfd_vma address);
|
||||
/* A function which is called when a symbol in notice_hash is
|
||||
defined or referenced. NAME is the symbol. ABFD, SECTION and
|
||||
ADDRESS are the value of the symbol. If SECTION is
|
||||
bfd_und_section, this is a reference. */
|
||||
bfd_boolean (*notice)
|
||||
(struct bfd_link_info *, const char *name,
|
||||
bfd *abfd, asection *section, bfd_vma address);
|
||||
/* General link info message. */
|
||||
void (*einfo)
|
||||
(const char *fmt, ...);
|
||||
};
|
||||
|
||||
/* The linker builds link_order structures which tell the code how to
|
||||
include input data in the output file. */
|
||||
|
||||
/* These are the types of link_order structures. */
|
||||
|
||||
enum bfd_link_order_type
|
||||
{
|
||||
bfd_undefined_link_order, /* Undefined. */
|
||||
bfd_indirect_link_order, /* Built from a section. */
|
||||
bfd_data_link_order, /* Set to explicit data. */
|
||||
bfd_section_reloc_link_order, /* Relocate against a section. */
|
||||
bfd_symbol_reloc_link_order /* Relocate against a symbol. */
|
||||
};
|
||||
|
||||
/* This is the link_order structure itself. These form a chain
|
||||
attached to the output section whose contents they are describing. */
|
||||
|
||||
struct bfd_link_order
|
||||
{
|
||||
/* Next link_order in chain. */
|
||||
struct bfd_link_order *next;
|
||||
/* Type of link_order. */
|
||||
enum bfd_link_order_type type;
|
||||
/* Offset within output section. */
|
||||
bfd_vma offset;
|
||||
/* Size within output section. */
|
||||
bfd_size_type size;
|
||||
/* Type specific information. */
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
/* Section to include. If this is used, then
|
||||
section->output_section must be the section the
|
||||
link_order is attached to, section->output_offset must
|
||||
equal the link_order offset field, and section->size
|
||||
must equal the link_order size field. Maybe these
|
||||
restrictions should be relaxed someday. */
|
||||
asection *section;
|
||||
} indirect;
|
||||
struct
|
||||
{
|
||||
/* Size of contents, or zero when contents size == size
|
||||
within output section.
|
||||
A non-zero value allows filling of the output section
|
||||
with an arbitrary repeated pattern. */
|
||||
unsigned int size;
|
||||
/* Data to put into file. */
|
||||
bfd_byte *contents;
|
||||
} data;
|
||||
struct
|
||||
{
|
||||
/* Description of reloc to generate. Used for
|
||||
bfd_section_reloc_link_order and
|
||||
bfd_symbol_reloc_link_order. */
|
||||
struct bfd_link_order_reloc *p;
|
||||
} reloc;
|
||||
} u;
|
||||
};
|
||||
|
||||
/* A linker order of type bfd_section_reloc_link_order or
|
||||
bfd_symbol_reloc_link_order means to create a reloc against a
|
||||
section or symbol, respectively. This is used to implement -Ur to
|
||||
generate relocs for the constructor tables. The
|
||||
bfd_link_order_reloc structure describes the reloc that BFD should
|
||||
create. It is similar to a arelent, but I didn't use arelent
|
||||
because the linker does not know anything about most symbols, and
|
||||
any asymbol structure it creates will be partially meaningless.
|
||||
This information could logically be in the bfd_link_order struct,
|
||||
but I didn't want to waste the space since these types of relocs
|
||||
are relatively rare. */
|
||||
|
||||
struct bfd_link_order_reloc
|
||||
{
|
||||
/* Reloc type. */
|
||||
bfd_reloc_code_real_type reloc;
|
||||
|
||||
union
|
||||
{
|
||||
/* For type bfd_section_reloc_link_order, this is the section
|
||||
the reloc should be against. This must be a section in the
|
||||
output BFD, not any of the input BFDs. */
|
||||
asection *section;
|
||||
/* For type bfd_symbol_reloc_link_order, this is the name of the
|
||||
symbol the reloc should be against. */
|
||||
const char *name;
|
||||
} u;
|
||||
|
||||
/* Addend to use. The object file should contain zero. The BFD
|
||||
backend is responsible for filling in the contents of the object
|
||||
file correctly. For some object file formats (e.g., COFF) the
|
||||
addend must be stored into in the object file, and for some
|
||||
(e.g., SPARC a.out) it is kept in the reloc. */
|
||||
bfd_vma addend;
|
||||
};
|
||||
|
||||
/* Allocate a new link_order for a section. */
|
||||
extern struct bfd_link_order *bfd_new_link_order (bfd *, asection *);
|
||||
|
||||
/* These structures are used to describe version information for the
|
||||
ELF linker. These structures could be manipulated entirely inside
|
||||
BFD, but it would be a pain. Instead, the regular linker sets up
|
||||
these structures, and then passes them into BFD. */
|
||||
|
||||
/* Glob pattern for a version. */
|
||||
|
||||
struct bfd_elf_version_expr
|
||||
{
|
||||
/* Next glob pattern for this version. */
|
||||
struct bfd_elf_version_expr *next;
|
||||
/* Glob pattern. */
|
||||
const char *pattern;
|
||||
/* NULL for a glob pattern, otherwise a straight symbol. */
|
||||
const char *symbol;
|
||||
/* Defined by ".symver". */
|
||||
unsigned int symver : 1;
|
||||
/* Defined by version script. */
|
||||
unsigned int script : 1;
|
||||
/* Pattern type. */
|
||||
#define BFD_ELF_VERSION_C_TYPE 1
|
||||
#define BFD_ELF_VERSION_CXX_TYPE 2
|
||||
#define BFD_ELF_VERSION_JAVA_TYPE 4
|
||||
unsigned int mask : 3;
|
||||
};
|
||||
|
||||
struct bfd_elf_version_expr_head
|
||||
{
|
||||
/* List of all patterns, both wildcards and non-wildcards. */
|
||||
struct bfd_elf_version_expr *list;
|
||||
/* Hash table for non-wildcards. */
|
||||
void *htab;
|
||||
/* Remaining patterns. */
|
||||
struct bfd_elf_version_expr *remaining;
|
||||
/* What kind of pattern types are present in list (bitmask). */
|
||||
unsigned int mask;
|
||||
};
|
||||
|
||||
/* Version dependencies. */
|
||||
|
||||
struct bfd_elf_version_deps
|
||||
{
|
||||
/* Next dependency for this version. */
|
||||
struct bfd_elf_version_deps *next;
|
||||
/* The version which this version depends upon. */
|
||||
struct bfd_elf_version_tree *version_needed;
|
||||
};
|
||||
|
||||
/* A node in the version tree. */
|
||||
|
||||
struct bfd_elf_version_tree
|
||||
{
|
||||
/* Next version. */
|
||||
struct bfd_elf_version_tree *next;
|
||||
/* Name of this version. */
|
||||
const char *name;
|
||||
/* Version number. */
|
||||
unsigned int vernum;
|
||||
/* Regular expressions for global symbols in this version. */
|
||||
struct bfd_elf_version_expr_head globals;
|
||||
/* Regular expressions for local symbols in this version. */
|
||||
struct bfd_elf_version_expr_head locals;
|
||||
/* List of versions which this version depends upon. */
|
||||
struct bfd_elf_version_deps *deps;
|
||||
/* Index of the version name. This is used within BFD. */
|
||||
unsigned int name_indx;
|
||||
/* Whether this version tree was used. This is used within BFD. */
|
||||
int used;
|
||||
/* Matching hook. */
|
||||
struct bfd_elf_version_expr *(*match)
|
||||
(struct bfd_elf_version_expr_head *head,
|
||||
struct bfd_elf_version_expr *prev, const char *sym);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,3 +0,0 @@
|
||||
#ifndef REPORT_BUGS_TO
|
||||
#define REPORT_BUGS_TO "<URL:http://www.sourceware.org/bugzilla/>"
|
||||
#endif
|
||||
191
include/bout.h
191
include/bout.h
@@ -1,191 +0,0 @@
|
||||
/* This file is a modified version of 'a.out.h'. It is to be used in all
|
||||
GNU tools modified to support the i80960 (or tools that operate on
|
||||
object files created by such tools).
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* All i80960 development is done in a CROSS-DEVELOPMENT environment. I.e.,
|
||||
object code is generated on, and executed under the direction of a symbolic
|
||||
debugger running on, a host system. We do not want to be subject to the
|
||||
vagaries of which host it is or whether it supports COFF or a.out format,
|
||||
or anything else. We DO want to:
|
||||
|
||||
o always generate the same format object files, regardless of host.
|
||||
|
||||
o have an 'a.out' header that we can modify for our own purposes
|
||||
(the 80960 is typically an embedded processor and may require
|
||||
enhanced linker support that the normal a.out.h header can't
|
||||
accommodate).
|
||||
|
||||
As for byte-ordering, the following rules apply:
|
||||
|
||||
o Text and data that is actually downloaded to the target is always
|
||||
in i80960 (little-endian) order.
|
||||
|
||||
o All other numbers (in the header, symbols, relocation directives)
|
||||
are in host byte-order: object files CANNOT be lifted from a
|
||||
little-end host and used on a big-endian (or vice versa) without
|
||||
modification.
|
||||
==> THIS IS NO LONGER TRUE USING BFD. WE CAN GENERATE ANY BYTE ORDER
|
||||
FOR THE HEADER, AND READ ANY BYTE ORDER. PREFERENCE WOULD BE TO
|
||||
USE LITTLE-ENDIAN BYTE ORDER THROUGHOUT, REGARDLESS OF HOST. <==
|
||||
|
||||
o The downloader ('comm960') takes care to generate a pseudo-header
|
||||
with correct (i80960) byte-ordering before shipping text and data
|
||||
off to the NINDY monitor in the target systems. Symbols and
|
||||
relocation info are never sent to the target. */
|
||||
|
||||
#define BMAGIC 0415
|
||||
/* We don't accept the following (see N_BADMAG macro).
|
||||
They're just here so GNU code will compile. */
|
||||
#define OMAGIC 0407 /* old impure format */
|
||||
#define NMAGIC 0410 /* read-only text */
|
||||
#define ZMAGIC 0413 /* demand load format */
|
||||
|
||||
/* FILE HEADER
|
||||
All 'lengths' are given as a number of bytes.
|
||||
All 'alignments' are for relinkable files only; an alignment of
|
||||
'n' indicates the corresponding segment must begin at an
|
||||
address that is a multiple of (2**n). */
|
||||
struct external_exec
|
||||
{
|
||||
/* Standard stuff */
|
||||
unsigned char e_info[4]; /* Identifies this as a b.out file */
|
||||
unsigned char e_text[4]; /* Length of text */
|
||||
unsigned char e_data[4]; /* Length of data */
|
||||
unsigned char e_bss[4]; /* Length of uninitialized data area */
|
||||
unsigned char e_syms[4]; /* Length of symbol table */
|
||||
unsigned char e_entry[4]; /* Runtime start address */
|
||||
unsigned char e_trsize[4]; /* Length of text relocation info */
|
||||
unsigned char e_drsize[4]; /* Length of data relocation info */
|
||||
|
||||
/* Added for i960 */
|
||||
unsigned char e_tload[4]; /* Text runtime load address */
|
||||
unsigned char e_dload[4]; /* Data runtime load address */
|
||||
unsigned char e_talign[1]; /* Alignment of text segment */
|
||||
unsigned char e_dalign[1]; /* Alignment of data segment */
|
||||
unsigned char e_balign[1]; /* Alignment of bss segment */
|
||||
unsigned char e_relaxable[1];/* Assembled with enough info to allow linker to relax */
|
||||
};
|
||||
|
||||
#define EXEC_BYTES_SIZE (sizeof (struct external_exec))
|
||||
|
||||
/* These macros use the a_xxx field names, since they operate on the exec
|
||||
structure after it's been byte-swapped and realigned on the host machine. */
|
||||
#define N_BADMAG(x) (((x).a_info)!=BMAGIC)
|
||||
#define N_TXTOFF(x) EXEC_BYTES_SIZE
|
||||
#define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text )
|
||||
#define N_TROFF(x) ( N_DATOFF(x) + (x).a_data )
|
||||
#define N_TRELOFF N_TROFF
|
||||
#define N_DROFF(x) ( N_TROFF(x) + (x).a_trsize )
|
||||
#define N_DRELOFF N_DROFF
|
||||
#define N_SYMOFF(x) ( N_DROFF(x) + (x).a_drsize )
|
||||
#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
|
||||
#define N_DATADDR(x) ( (x).a_dload )
|
||||
|
||||
/* Address of text segment in memory after it is loaded. */
|
||||
#if !defined (N_TXTADDR)
|
||||
#define N_TXTADDR(x) 0
|
||||
#endif
|
||||
|
||||
/* A single entry in the symbol table. */
|
||||
struct nlist
|
||||
{
|
||||
union
|
||||
{
|
||||
char* n_name;
|
||||
struct nlist * n_next;
|
||||
long n_strx; /* Index into string table */
|
||||
} n_un;
|
||||
|
||||
unsigned char n_type; /* See below */
|
||||
char n_other; /* Used in i80960 support -- see below */
|
||||
short n_desc;
|
||||
unsigned long n_value;
|
||||
};
|
||||
|
||||
|
||||
/* Legal values of n_type. */
|
||||
#define N_UNDF 0 /* Undefined symbol */
|
||||
#define N_ABS 2 /* Absolute symbol */
|
||||
#define N_TEXT 4 /* Text symbol */
|
||||
#define N_DATA 6 /* Data symbol */
|
||||
#define N_BSS 8 /* BSS symbol */
|
||||
#define N_FN 31 /* Filename symbol */
|
||||
|
||||
#define N_EXT 1 /* External symbol (OR'd in with one of above) */
|
||||
#define N_TYPE 036 /* Mask for all the type bits */
|
||||
#define N_STAB 0340 /* Mask for all bits used for SDB entries */
|
||||
|
||||
/* MEANING OF 'n_other'
|
||||
|
||||
If non-zero, the 'n_other' fields indicates either a leaf procedure or
|
||||
a system procedure, as follows:
|
||||
|
||||
1 <= n_other <= 32 :
|
||||
The symbol is the entry point to a system procedure.
|
||||
'n_value' is the address of the entry, as for any other
|
||||
procedure. The system procedure number (which can be used in
|
||||
a 'calls' instruction) is (n_other-1). These entries come from
|
||||
'.sysproc' directives.
|
||||
|
||||
n_other == N_CALLNAME
|
||||
the symbol is the 'call' entry point to a leaf procedure.
|
||||
The *next* symbol in the symbol table must be the corresponding
|
||||
'bal' entry point to the procedure (see following). These
|
||||
entries come from '.leafproc' directives in which two different
|
||||
symbols are specified (the first one is represented here).
|
||||
|
||||
|
||||
n_other == N_BALNAME
|
||||
the symbol is the 'bal' entry point to a leaf procedure.
|
||||
These entries result from '.leafproc' directives in which only
|
||||
one symbol is specified, or in which the same symbol is
|
||||
specified twice.
|
||||
|
||||
Note that an N_CALLNAME entry *must* have a corresponding N_BALNAME entry,
|
||||
but not every N_BALNAME entry must have an N_CALLNAME entry. */
|
||||
#define N_CALLNAME ((char)-1)
|
||||
#define N_BALNAME ((char)-2)
|
||||
#define IS_CALLNAME(x) (N_CALLNAME == (x))
|
||||
#define IS_BALNAME(x) (N_BALNAME == (x))
|
||||
#define IS_OTHER(x) ((x)>0 && (x) <=32)
|
||||
|
||||
#define b_out_relocation_info relocation_info
|
||||
struct relocation_info
|
||||
{
|
||||
int r_address; /* File address of item to be relocated. */
|
||||
unsigned
|
||||
#define r_index r_symbolnum
|
||||
r_symbolnum:24, /* Index of symbol on which relocation is based,
|
||||
if r_extern is set. Otherwise set to
|
||||
either N_TEXT, N_DATA, or N_BSS to
|
||||
indicate section on which relocation is
|
||||
based. */
|
||||
r_pcrel:1, /* 1 => relocate PC-relative; else absolute
|
||||
On i960, pc-relative implies 24-bit
|
||||
address, absolute implies 32-bit. */
|
||||
r_length:2, /* Number of bytes to relocate:
|
||||
0 => 1 byte
|
||||
1 => 2 bytes -- used for 13 bit pcrel
|
||||
2 => 4 bytes. */
|
||||
r_extern:1,
|
||||
r_bsr:1, /* Something for the GNU NS32K assembler. */
|
||||
r_disp:1, /* Something for the GNU NS32K assembler. */
|
||||
r_callj:1, /* 1 if relocation target is an i960 'callj'. */
|
||||
r_relaxable:1; /* 1 if enough info is left to relax the data. */
|
||||
};
|
||||
@@ -1,70 +0,0 @@
|
||||
2006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
|
||||
|
||||
* internal.h: Add relocation number R_IMM24 for Z80.
|
||||
|
||||
2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
|
||||
|
||||
* internal.h: Add relocation number for Z80
|
||||
* z80.h: New file.
|
||||
|
||||
2005-08-18 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* a29k.h: Delete.
|
||||
|
||||
2005-07-14 Daniel Marques <marques@cs.cornell.edu>
|
||||
|
||||
* alpha.h (ALPHA_ECOFF_COMPRESSEDMAG): Define.
|
||||
* ecoff.h (ALPHA_MAGIC_COMPRESSED): Define.
|
||||
|
||||
2005-05-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* Update the address and phone number of the FSF organization in
|
||||
the GPL notices in the following files:
|
||||
a29k.h, alpha.h, apollo.h, arm.h, aux-coff.h, ecoff.h, external.h,
|
||||
go32exe.h, h8300.h, h8500.h, i386.h, i860.h, i960.h, ia64.h,
|
||||
internal.h, m68k.h, m88k.h, maxq.h, mcore.h, mips.h, mipspe.h,
|
||||
or32.h, pe.h, powerpc.h, rs6k64.h, sh.h, sparc.h, ti.h, tic30.h,
|
||||
tic4x.h, tic54x.h, tic80.h, w65.h, we32k.h, xcoff.h, z8k.h
|
||||
|
||||
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* xcoff.h (struct xcoff_loader_info): Warning fix.
|
||||
|
||||
2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
|
||||
|
||||
* maxq.h (F_MAXQ10, F_MAXQ20): Define.
|
||||
|
||||
2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
|
||||
Vineet Sharma <vineets@noida.hcltech.com>
|
||||
|
||||
* maxq.h: New file: Defintions for the maxq port.
|
||||
|
||||
2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
|
||||
|
||||
* pe.h (IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY): Define.
|
||||
(IMAGE_WEAK_EXTERN_SEARCH_LIBRARY): Same.
|
||||
(IMAGE_WEAK_EXTERN_SEARCH_ALIAS): Same.
|
||||
|
||||
2004-08-13 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* symconst.h (langMax): Fix typo in comment.
|
||||
|
||||
2004-04-23 Chris Demetriou <cgd@broadcom.com>
|
||||
|
||||
* mips.h (MIPS_R_RELHI, MIPS_R_RELLO, MIPS_R_SWITCH): Remove
|
||||
(MIPS_R_PCREL16): Update comment.
|
||||
* ecoff.h (struct ecoff_value_adjust): Remove structure.
|
||||
(struct ecoff_debug_info): Remove 'adjust' member.
|
||||
|
||||
2004-04-20 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* internal.h (R_SECREL32): Add.
|
||||
|
||||
For older changes see ChangeLog-9103
|
||||
|
||||
Local Variables:
|
||||
mode: change-log
|
||||
left-margin: 8
|
||||
fill-column: 74
|
||||
version-control: never
|
||||
End:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,385 +0,0 @@
|
||||
/* ECOFF support on Alpha machines.
|
||||
coff/ecoff.h must be included before this file.
|
||||
|
||||
Copyright 2001, 2005 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr
|
||||
{
|
||||
unsigned char f_magic[2]; /* magic number */
|
||||
unsigned char f_nscns[2]; /* number of sections */
|
||||
unsigned char f_timdat[4]; /* time & date stamp */
|
||||
unsigned char f_symptr[8]; /* file pointer to symtab */
|
||||
unsigned char f_nsyms[4]; /* number of symtab entries */
|
||||
unsigned char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
unsigned char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
/* Magic numbers are defined in coff/ecoff.h. */
|
||||
#define ALPHA_ECOFF_BADMAG(x) \
|
||||
((x).f_magic != ALPHA_MAGIC && (x).f_magic != ALPHA_MAGIC_BSD)
|
||||
|
||||
#define ALPHA_ECOFF_COMPRESSEDMAG(x) \
|
||||
((x).f_magic == ALPHA_MAGIC_COMPRESSED)
|
||||
|
||||
/* The object type is encoded in the f_flags. */
|
||||
#define F_ALPHA_OBJECT_TYPE_MASK 0x3000
|
||||
#define F_ALPHA_NO_SHARED 0x1000
|
||||
#define F_ALPHA_SHARABLE 0x2000
|
||||
#define F_ALPHA_CALL_SHARED 0x3000
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 24
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
typedef struct external_aouthdr
|
||||
{
|
||||
unsigned char magic[2]; /* type of file */
|
||||
unsigned char vstamp[2]; /* version stamp */
|
||||
unsigned char bldrev[2]; /* ?? */
|
||||
unsigned char padding[2]; /* pad to quadword boundary */
|
||||
unsigned char tsize[8]; /* text size in bytes */
|
||||
unsigned char dsize[8]; /* initialized data " " */
|
||||
unsigned char bsize[8]; /* uninitialized data " " */
|
||||
unsigned char entry[8]; /* entry pt. */
|
||||
unsigned char text_start[8]; /* base of text used for this file */
|
||||
unsigned char data_start[8]; /* base of data used for this file */
|
||||
unsigned char bss_start[8]; /* base of bss used for this file */
|
||||
unsigned char gprmask[4]; /* bitmask of general registers used */
|
||||
unsigned char fprmask[4]; /* bitmask of floating point registers used */
|
||||
unsigned char gp_value[8]; /* value for gp register */
|
||||
} AOUTHDR;
|
||||
|
||||
/* compute size of a header */
|
||||
|
||||
#define AOUTSZ 80
|
||||
#define AOUTHDRSZ 80
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
struct external_scnhdr
|
||||
{
|
||||
unsigned char s_name[8]; /* section name */
|
||||
unsigned char s_paddr[8]; /* physical address, aliased s_nlib */
|
||||
unsigned char s_vaddr[8]; /* virtual address */
|
||||
unsigned char s_size[8]; /* section size */
|
||||
unsigned char s_scnptr[8]; /* file ptr to raw data for section */
|
||||
unsigned char s_relptr[8]; /* file ptr to relocation */
|
||||
unsigned char s_lnnoptr[8]; /* file ptr to line numbers */
|
||||
unsigned char s_nreloc[2]; /* number of relocation entries */
|
||||
unsigned char s_nlnno[2]; /* number of line number entries*/
|
||||
unsigned char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 64
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
unsigned char r_vaddr[8];
|
||||
unsigned char r_symndx[4];
|
||||
unsigned char r_bits[4];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
/* Constants to unpack the r_bits field. The Alpha seems to always be
|
||||
little endian, so I haven't bothered to define big endian variants
|
||||
of these. */
|
||||
|
||||
#define RELOC_BITS0_TYPE_LITTLE 0xff
|
||||
#define RELOC_BITS0_TYPE_SH_LITTLE 0
|
||||
|
||||
#define RELOC_BITS1_EXTERN_LITTLE 0x01
|
||||
|
||||
#define RELOC_BITS1_OFFSET_LITTLE 0x7e
|
||||
#define RELOC_BITS1_OFFSET_SH_LITTLE 1
|
||||
|
||||
#define RELOC_BITS1_RESERVED_LITTLE 0x80
|
||||
#define RELOC_BITS1_RESERVED_SH_LITTLE 7
|
||||
#define RELOC_BITS2_RESERVED_LITTLE 0xff
|
||||
#define RELOC_BITS2_RESERVED_SH_LEFT_LITTLE 1
|
||||
#define RELOC_BITS3_RESERVED_LITTLE 0x03
|
||||
#define RELOC_BITS3_RESERVED_SH_LEFT_LITTLE 9
|
||||
|
||||
#define RELOC_BITS3_SIZE_LITTLE 0xfc
|
||||
#define RELOC_BITS3_SIZE_SH_LITTLE 2
|
||||
|
||||
/* The r_type field in a reloc is one of the following values. */
|
||||
#define ALPHA_R_IGNORE 0
|
||||
#define ALPHA_R_REFLONG 1
|
||||
#define ALPHA_R_REFQUAD 2
|
||||
#define ALPHA_R_GPREL32 3
|
||||
#define ALPHA_R_LITERAL 4
|
||||
#define ALPHA_R_LITUSE 5
|
||||
#define ALPHA_R_GPDISP 6
|
||||
#define ALPHA_R_BRADDR 7
|
||||
#define ALPHA_R_HINT 8
|
||||
#define ALPHA_R_SREL16 9
|
||||
#define ALPHA_R_SREL32 10
|
||||
#define ALPHA_R_SREL64 11
|
||||
#define ALPHA_R_OP_PUSH 12
|
||||
#define ALPHA_R_OP_STORE 13
|
||||
#define ALPHA_R_OP_PSUB 14
|
||||
#define ALPHA_R_OP_PRSHIFT 15
|
||||
#define ALPHA_R_GPVALUE 16
|
||||
#define ALPHA_R_GPRELHIGH 17
|
||||
#define ALPHA_R_GPRELLOW 18
|
||||
#define ALPHA_R_IMMED 19
|
||||
|
||||
/* Overloaded reloc value used by Net- and OpenBSD. */
|
||||
#define ALPHA_R_LITERALSLEAZY 17
|
||||
|
||||
/* With ALPHA_R_LITUSE, the r_size field is one of the following values. */
|
||||
#define ALPHA_R_LU_BASE 1
|
||||
#define ALPHA_R_LU_BYTOFF 2
|
||||
#define ALPHA_R_LU_JSR 3
|
||||
|
||||
/* With ALPHA_R_IMMED, the r_size field is one of the following values. */
|
||||
#define ALPHA_R_IMMED_GP_16 1
|
||||
#define ALPHA_R_IMMED_GP_HI32 2
|
||||
#define ALPHA_R_IMMED_SCN_HI32 3
|
||||
#define ALPHA_R_IMMED_BR_HI32 4
|
||||
#define ALPHA_R_IMMED_LO32 5
|
||||
|
||||
/********************** SYMBOLIC INFORMATION **********************/
|
||||
|
||||
/* Written by John Gilmore. */
|
||||
|
||||
/* ECOFF uses COFF-like section structures, but its own symbol format.
|
||||
This file defines the symbol format in fields whose size and alignment
|
||||
will not vary on different host systems. */
|
||||
|
||||
/* File header as a set of bytes */
|
||||
|
||||
struct hdr_ext
|
||||
{
|
||||
unsigned char h_magic[2];
|
||||
unsigned char h_vstamp[2];
|
||||
unsigned char h_ilineMax[4];
|
||||
unsigned char h_idnMax[4];
|
||||
unsigned char h_ipdMax[4];
|
||||
unsigned char h_isymMax[4];
|
||||
unsigned char h_ioptMax[4];
|
||||
unsigned char h_iauxMax[4];
|
||||
unsigned char h_issMax[4];
|
||||
unsigned char h_issExtMax[4];
|
||||
unsigned char h_ifdMax[4];
|
||||
unsigned char h_crfd[4];
|
||||
unsigned char h_iextMax[4];
|
||||
unsigned char h_cbLine[8];
|
||||
unsigned char h_cbLineOffset[8];
|
||||
unsigned char h_cbDnOffset[8];
|
||||
unsigned char h_cbPdOffset[8];
|
||||
unsigned char h_cbSymOffset[8];
|
||||
unsigned char h_cbOptOffset[8];
|
||||
unsigned char h_cbAuxOffset[8];
|
||||
unsigned char h_cbSsOffset[8];
|
||||
unsigned char h_cbSsExtOffset[8];
|
||||
unsigned char h_cbFdOffset[8];
|
||||
unsigned char h_cbRfdOffset[8];
|
||||
unsigned char h_cbExtOffset[8];
|
||||
};
|
||||
|
||||
/* File descriptor external record */
|
||||
|
||||
struct fdr_ext
|
||||
{
|
||||
unsigned char f_adr[8];
|
||||
unsigned char f_cbLineOffset[8];
|
||||
unsigned char f_cbLine[8];
|
||||
unsigned char f_cbSs[8];
|
||||
unsigned char f_rss[4];
|
||||
unsigned char f_issBase[4];
|
||||
unsigned char f_isymBase[4];
|
||||
unsigned char f_csym[4];
|
||||
unsigned char f_ilineBase[4];
|
||||
unsigned char f_cline[4];
|
||||
unsigned char f_ioptBase[4];
|
||||
unsigned char f_copt[4];
|
||||
unsigned char f_ipdFirst[4];
|
||||
unsigned char f_cpd[4];
|
||||
unsigned char f_iauxBase[4];
|
||||
unsigned char f_caux[4];
|
||||
unsigned char f_rfdBase[4];
|
||||
unsigned char f_crfd[4];
|
||||
unsigned char f_bits1[1];
|
||||
unsigned char f_bits2[3];
|
||||
unsigned char f_padding[4];
|
||||
};
|
||||
|
||||
#define FDR_BITS1_LANG_BIG 0xF8
|
||||
#define FDR_BITS1_LANG_SH_BIG 3
|
||||
#define FDR_BITS1_LANG_LITTLE 0x1F
|
||||
#define FDR_BITS1_LANG_SH_LITTLE 0
|
||||
|
||||
#define FDR_BITS1_FMERGE_BIG 0x04
|
||||
#define FDR_BITS1_FMERGE_LITTLE 0x20
|
||||
|
||||
#define FDR_BITS1_FREADIN_BIG 0x02
|
||||
#define FDR_BITS1_FREADIN_LITTLE 0x40
|
||||
|
||||
#define FDR_BITS1_FBIGENDIAN_BIG 0x01
|
||||
#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80
|
||||
|
||||
#define FDR_BITS2_GLEVEL_BIG 0xC0
|
||||
#define FDR_BITS2_GLEVEL_SH_BIG 6
|
||||
#define FDR_BITS2_GLEVEL_LITTLE 0x03
|
||||
#define FDR_BITS2_GLEVEL_SH_LITTLE 0
|
||||
|
||||
/* We ignore the `reserved' field in bits2. */
|
||||
|
||||
/* Procedure descriptor external record */
|
||||
|
||||
struct pdr_ext {
|
||||
unsigned char p_adr[8];
|
||||
unsigned char p_cbLineOffset[8];
|
||||
unsigned char p_isym[4];
|
||||
unsigned char p_iline[4];
|
||||
unsigned char p_regmask[4];
|
||||
unsigned char p_regoffset[4];
|
||||
unsigned char p_iopt[4];
|
||||
unsigned char p_fregmask[4];
|
||||
unsigned char p_fregoffset[4];
|
||||
unsigned char p_frameoffset[4];
|
||||
unsigned char p_lnLow[4];
|
||||
unsigned char p_lnHigh[4];
|
||||
unsigned char p_gp_prologue[1];
|
||||
unsigned char p_bits1[1];
|
||||
unsigned char p_bits2[1];
|
||||
unsigned char p_localoff[1];
|
||||
unsigned char p_framereg[2];
|
||||
unsigned char p_pcreg[2];
|
||||
};
|
||||
|
||||
#define PDR_BITS1_GP_USED_BIG 0x80
|
||||
#define PDR_BITS1_REG_FRAME_BIG 0x40
|
||||
#define PDR_BITS1_PROF_BIG 0x20
|
||||
#define PDR_BITS1_RESERVED_BIG 0x1f
|
||||
#define PDR_BITS1_RESERVED_SH_LEFT_BIG 8
|
||||
#define PDR_BITS2_RESERVED_BIG 0xff
|
||||
#define PDR_BITS2_RESERVED_SH_BIG 0
|
||||
|
||||
#define PDR_BITS1_GP_USED_LITTLE 0x01
|
||||
#define PDR_BITS1_REG_FRAME_LITTLE 0x02
|
||||
#define PDR_BITS1_PROF_LITTLE 0x04
|
||||
#define PDR_BITS1_RESERVED_LITTLE 0xf8
|
||||
#define PDR_BITS1_RESERVED_SH_LITTLE 3
|
||||
#define PDR_BITS2_RESERVED_LITTLE 0xff
|
||||
#define PDR_BITS2_RESERVED_SH_LEFT_LITTLE 5
|
||||
|
||||
/* Line numbers */
|
||||
|
||||
struct line_ext {
|
||||
unsigned char l_line[4];
|
||||
};
|
||||
|
||||
/* Symbol external record */
|
||||
|
||||
struct sym_ext {
|
||||
unsigned char s_value[8];
|
||||
unsigned char s_iss[4];
|
||||
unsigned char s_bits1[1];
|
||||
unsigned char s_bits2[1];
|
||||
unsigned char s_bits3[1];
|
||||
unsigned char s_bits4[1];
|
||||
};
|
||||
|
||||
#define SYM_BITS1_ST_BIG 0xFC
|
||||
#define SYM_BITS1_ST_SH_BIG 2
|
||||
#define SYM_BITS1_ST_LITTLE 0x3F
|
||||
#define SYM_BITS1_ST_SH_LITTLE 0
|
||||
|
||||
#define SYM_BITS1_SC_BIG 0x03
|
||||
#define SYM_BITS1_SC_SH_LEFT_BIG 3
|
||||
#define SYM_BITS1_SC_LITTLE 0xC0
|
||||
#define SYM_BITS1_SC_SH_LITTLE 6
|
||||
|
||||
#define SYM_BITS2_SC_BIG 0xE0
|
||||
#define SYM_BITS2_SC_SH_BIG 5
|
||||
#define SYM_BITS2_SC_LITTLE 0x07
|
||||
#define SYM_BITS2_SC_SH_LEFT_LITTLE 2
|
||||
|
||||
#define SYM_BITS2_RESERVED_BIG 0x10
|
||||
#define SYM_BITS2_RESERVED_LITTLE 0x08
|
||||
|
||||
#define SYM_BITS2_INDEX_BIG 0x0F
|
||||
#define SYM_BITS2_INDEX_SH_LEFT_BIG 16
|
||||
#define SYM_BITS2_INDEX_LITTLE 0xF0
|
||||
#define SYM_BITS2_INDEX_SH_LITTLE 4
|
||||
|
||||
#define SYM_BITS3_INDEX_SH_LEFT_BIG 8
|
||||
#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4
|
||||
|
||||
#define SYM_BITS4_INDEX_SH_LEFT_BIG 0
|
||||
#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12
|
||||
|
||||
/* External symbol external record */
|
||||
|
||||
struct ext_ext {
|
||||
struct sym_ext es_asym;
|
||||
unsigned char es_bits1[1];
|
||||
unsigned char es_bits2[3];
|
||||
unsigned char es_ifd[4];
|
||||
};
|
||||
|
||||
#define EXT_BITS1_JMPTBL_BIG 0x80
|
||||
#define EXT_BITS1_JMPTBL_LITTLE 0x01
|
||||
|
||||
#define EXT_BITS1_COBOL_MAIN_BIG 0x40
|
||||
#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02
|
||||
|
||||
#define EXT_BITS1_WEAKEXT_BIG 0x20
|
||||
#define EXT_BITS1_WEAKEXT_LITTLE 0x04
|
||||
|
||||
/* Dense numbers external record */
|
||||
|
||||
struct dnr_ext {
|
||||
unsigned char d_rfd[4];
|
||||
unsigned char d_index[4];
|
||||
};
|
||||
|
||||
/* Relative file descriptor */
|
||||
|
||||
struct rfd_ext {
|
||||
unsigned char rfd[4];
|
||||
};
|
||||
|
||||
/* Optimizer symbol external record */
|
||||
|
||||
struct opt_ext {
|
||||
unsigned char o_bits1[1];
|
||||
unsigned char o_bits2[1];
|
||||
unsigned char o_bits3[1];
|
||||
unsigned char o_bits4[1];
|
||||
struct rndx_ext o_rndx;
|
||||
unsigned char o_offset[4];
|
||||
};
|
||||
|
||||
#define OPT_BITS2_VALUE_SH_LEFT_BIG 16
|
||||
#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0
|
||||
|
||||
#define OPT_BITS3_VALUE_SH_LEFT_BIG 8
|
||||
#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8
|
||||
|
||||
#define OPT_BITS4_VALUE_SH_LEFT_BIG 0
|
||||
#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16
|
||||
@@ -1,124 +0,0 @@
|
||||
/* coff information for Apollo M68K
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define DO_NOT_DEFINE_AOUTHDR
|
||||
#define L_LNNO_SIZE 2
|
||||
#include "coff/external.h"
|
||||
|
||||
/* Motorola 68000/68008/68010/68020 */
|
||||
#define MC68MAGIC 0520
|
||||
#define MC68KWRMAGIC 0520 /* writeable text segments */
|
||||
#define MC68TVMAGIC 0521
|
||||
#define MC68KROMAGIC 0521 /* readonly shareable text segments */
|
||||
#define MC68KPGMAGIC 0522 /* demand paged text segments */
|
||||
#define M68MAGIC 0210
|
||||
#define M68TVMAGIC 0211
|
||||
|
||||
/* Apollo 68000-based machines have a different magic number. This comes
|
||||
* from /usr/include/apollo/filehdr.h
|
||||
*/
|
||||
#define APOLLOM68KMAGIC 0627
|
||||
|
||||
#define OMAGIC M68MAGIC
|
||||
#define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \
|
||||
((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && \
|
||||
((x).f_magic!=APOLLOM68KMAGIC) )
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
char o_sri[4]; /* Apollo specific - .sri data pointer */
|
||||
char o_inlib[4]; /* Apollo specific - .inlib data pointer */
|
||||
char vid[8]; /* Apollo specific - 64 bit version ID */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
#define APOLLO_COFF_VERSION_NUMBER 1 /* the value of the aouthdr magic */
|
||||
#define AOUTHDRSZ 44
|
||||
#define AOUTSZ 44
|
||||
|
||||
/* Apollo allowa for larger section names by allowing
|
||||
them to be in the string table. */
|
||||
|
||||
/* If s_zeores is all zeroes, s_offset gives the real
|
||||
location of the name in the string table. */
|
||||
|
||||
#define s_zeroes section_name.s_name
|
||||
#define s_offset (section_name.s_name+4)
|
||||
|
||||
/* More names of "special" sections. */
|
||||
#define _TV ".tv"
|
||||
#define _INIT ".init"
|
||||
#define _FINI ".fini"
|
||||
#define _LINES ".lines"
|
||||
#define _BLOCKS ".blocks"
|
||||
#define _SRI ".sri" /* Static Resource Information (systype,
|
||||
et al.) */
|
||||
#define _MIR ".mir" /* Module Information Records */
|
||||
#define _APTV ".aptv" /* Apollo-style transfer vectors. */
|
||||
#define _INLIB ".inlib" /* Shared Library information */
|
||||
#define _RWDI ".rwdi" /* Read/write data initialization directives for
|
||||
compressed sections */
|
||||
#define _UNWIND ".unwind" /* Stack unwind information */
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
#ifdef M68K_COFF_OFFSET
|
||||
char r_offset[4];
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
|
||||
#ifdef M68K_COFF_OFFSET
|
||||
#define RELSZ 14
|
||||
#else
|
||||
#define RELSZ 10
|
||||
#endif
|
||||
|
||||
/* Apollo specific STYP flags */
|
||||
|
||||
#define STYP_RELOCATED_NOT_LOADED 0x00010000 /* Section is relocated normally during linking, but need
|
||||
not be loaded during program execution */
|
||||
#define STYP_DEBUG 0x00020000 /* debug section */
|
||||
#define STYP_OVERLAY 0x00040000 /* Section is overlayed */
|
||||
#define STYP_INSTRUCTION 0x00200000 /* Section contains executable code */
|
||||
|
||||
#define STYP_ZERO 0x00800000 /* Section is initialized to zero */
|
||||
#define STYP_INSTALLED 0x02000000 /* Section should be installable in KGT */
|
||||
#define STYP_LOOK_INSTALLED 0x04000000 /* Look for section in KGT */
|
||||
#define STYP_SECALIGN1 0x08000000 /* Specially aligned section */
|
||||
#define STYP_SECALIGN2 0x10000000 /* " " " */
|
||||
#define STYP_COMPRESSED 0x20000000 /* No section data per se (s_scnptr = 0), but there are
|
||||
initialization directives for it in .rwdi section
|
||||
(used in conjunction with STYP_BSS) */
|
||||
@@ -1,128 +0,0 @@
|
||||
/* ARM COFF support for BFD.
|
||||
Copyright 1998, 1999, 2000, 2002, 2003 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define COFFARM 1
|
||||
|
||||
#define L_LNNO_SIZE 2
|
||||
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
|
||||
#include "coff/external.h"
|
||||
|
||||
/* Bits for f_flags:
|
||||
F_RELFLG relocation info stripped from file
|
||||
F_EXEC file is executable (no unresolved external references)
|
||||
F_LNNO line numbers stripped from file
|
||||
F_LSYMS local symbols stripped from file
|
||||
F_INTERWORK file supports switching between ARM and Thumb instruction sets
|
||||
F_INTERWORK_SET the F_INTERWORK bit is valid
|
||||
F_APCS_FLOAT code passes float arguments in float registers
|
||||
F_PIC code is reentrant/position-independent
|
||||
F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
|
||||
F_APCS_26 file uses 26 bit ARM Procedure Calling Standard
|
||||
F_APCS_SET the F_APCS_26, F_APCS_FLOAT and F_PIC bits have been initialised
|
||||
F_SOFT_FLOAT code does not use floating point instructions. */
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
#define F_INTERWORK (0x0010)
|
||||
#define F_INTERWORK_SET (0x0020)
|
||||
#define F_APCS_FLOAT (0x0040)
|
||||
#undef F_AR16WR
|
||||
#define F_PIC (0x0080)
|
||||
#define F_AR32WR (0x0100)
|
||||
#define F_APCS_26 (0x0400)
|
||||
#define F_APCS_SET (0x0800)
|
||||
#define F_SOFT_FLOAT (0x2000)
|
||||
#define F_VFP_FLOAT (0x4000)
|
||||
|
||||
/* Bits stored in flags field of the internal_f structure */
|
||||
|
||||
#define F_INTERWORK (0x0010)
|
||||
#define F_APCS_FLOAT (0x0040)
|
||||
#define F_PIC (0x0080)
|
||||
#define F_APCS26 (0x1000)
|
||||
#define F_ARM_ARCHITECTURE_MASK (0x4000+0x0800+0x0400)
|
||||
#define F_ARM_2 (0x0400)
|
||||
#define F_ARM_2a (0x0800)
|
||||
#define F_ARM_3 (0x0c00)
|
||||
#define F_ARM_3M (0x4000)
|
||||
#define F_ARM_4 (0x4400)
|
||||
#define F_ARM_4T (0x4800)
|
||||
#define F_ARM_5 (0x4c00)
|
||||
|
||||
/*
|
||||
ARMMAGIC ought to encoded the procesor type,
|
||||
but it is too late to change it now, instead
|
||||
the flags field of the internal_f structure
|
||||
is used as shown above.
|
||||
|
||||
XXX - NC 5/6/97. */
|
||||
|
||||
#define ARMMAGIC 0xa00 /* I just made this up */
|
||||
|
||||
#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC))
|
||||
|
||||
#define ARMPEMAGIC 0x1c0
|
||||
#define THUMBPEMAGIC 0x1c2
|
||||
|
||||
#undef ARMBADMAG
|
||||
#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC) && ((x).f_magic != ARMPEMAGIC) && ((x).f_magic != THUMBPEMAGIC))
|
||||
|
||||
#define OMAGIC 0404 /* object files, eg as output */
|
||||
#define ZMAGIC 0413 /* demand load format, eg normal ld output */
|
||||
#define STMAGIC 0401 /* target shlib */
|
||||
#define SHMAGIC 0443 /* host shlib */
|
||||
|
||||
/* define some NT default values */
|
||||
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
|
||||
#define NT_SECTION_ALIGNMENT 0x1000
|
||||
#define NT_FILE_ALIGNMENT 0x200
|
||||
#define NT_DEF_RESERVE 0x100000
|
||||
#define NT_DEF_COMMIT 0x1000
|
||||
|
||||
/* We use the .rdata section to hold read only data. */
|
||||
#define _LIT ".rdata"
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
#ifdef ARM_WINCE
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
#else
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
char r_offset[4];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 14
|
||||
#endif
|
||||
|
||||
#define ARM_NOTE_SECTION ".note"
|
||||
@@ -1,48 +0,0 @@
|
||||
/* Modifications of internal.h and m68k.h needed by A/UX
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Suggested by Ian Lance Taylor <ian@cygnus.com> */
|
||||
|
||||
#ifndef GNU_COFF_AUX_H
|
||||
#define GNU_COFF_AUX_H 1
|
||||
|
||||
#include "coff/internal.h"
|
||||
#include "coff/m68k.h"
|
||||
|
||||
/* Section contains 64-byte padded pathnames of shared libraries */
|
||||
#undef STYP_LIB
|
||||
#define STYP_LIB 0x200
|
||||
|
||||
/* Section contains shared library initialization code */
|
||||
#undef STYP_INIT
|
||||
#define STYP_INIT 0x400
|
||||
|
||||
/* Section contains .ident information */
|
||||
#undef STYP_IDENT
|
||||
#define STYP_IDENT 0x800
|
||||
|
||||
/* Section types used by bfd and gas not defined (directly) by A/UX */
|
||||
#undef STYP_OVER
|
||||
#define STYP_OVER 0
|
||||
#undef STYP_INFO
|
||||
#define STYP_INFO STYP_IDENT
|
||||
|
||||
/* Traditional name of the section tagged with STYP_LIB */
|
||||
#define _LIB ".lib"
|
||||
|
||||
#endif /* GNU_COFF_AUX_H */
|
||||
@@ -1,410 +0,0 @@
|
||||
/* Generic ECOFF support.
|
||||
This does not include symbol information, found in sym.h and
|
||||
symconst.h.
|
||||
|
||||
Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef ECOFF_H
|
||||
#define ECOFF_H
|
||||
|
||||
/* Mips magic numbers used in filehdr. MIPS_MAGIC_LITTLE is used on
|
||||
little endian machines. MIPS_MAGIC_BIG is used on big endian
|
||||
machines. Where is MIPS_MAGIC_1 from? */
|
||||
#define MIPS_MAGIC_1 0x0180
|
||||
#define MIPS_MAGIC_LITTLE 0x0162
|
||||
#define MIPS_MAGIC_BIG 0x0160
|
||||
|
||||
/* These are the magic numbers used for MIPS code compiled at ISA
|
||||
level 2. */
|
||||
#define MIPS_MAGIC_LITTLE2 0x0166
|
||||
#define MIPS_MAGIC_BIG2 0x0163
|
||||
|
||||
/* These are the magic numbers used for MIPS code compiled at ISA
|
||||
level 3. */
|
||||
#define MIPS_MAGIC_LITTLE3 0x142
|
||||
#define MIPS_MAGIC_BIG3 0x140
|
||||
|
||||
/* Alpha magic numbers used in filehdr. */
|
||||
#define ALPHA_MAGIC 0x183
|
||||
#define ALPHA_MAGIC_BSD 0x185
|
||||
/* A compressed version of an ALPHA_MAGIC file created by DEC's tools. */
|
||||
#define ALPHA_MAGIC_COMPRESSED 0x188
|
||||
|
||||
/* Magic numbers used in a.out header. */
|
||||
#define ECOFF_AOUT_OMAGIC 0407 /* not demand paged (ld -N). */
|
||||
#define ECOFF_AOUT_ZMAGIC 0413 /* demand load format, eg normal ld output */
|
||||
|
||||
/* Names of special sections. */
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _RDATA ".rdata"
|
||||
#define _SDATA ".sdata"
|
||||
#define _SBSS ".sbss"
|
||||
#define _LITA ".lita"
|
||||
#define _LIT4 ".lit4"
|
||||
#define _LIT8 ".lit8"
|
||||
#define _LIB ".lib"
|
||||
#define _INIT ".init"
|
||||
#define _FINI ".fini"
|
||||
#define _PDATA ".pdata"
|
||||
#define _XDATA ".xdata"
|
||||
#define _GOT ".got"
|
||||
#define _HASH ".hash"
|
||||
#define _DYNSYM ".dynsym"
|
||||
#define _DYNSTR ".dynstr"
|
||||
#define _RELDYN ".rel.dyn"
|
||||
#define _CONFLIC ".conflic"
|
||||
#define _COMMENT ".comment"
|
||||
#define _LIBLIST ".liblist"
|
||||
#define _DYNAMIC ".dynamic"
|
||||
#define _RCONST ".rconst"
|
||||
|
||||
/* ECOFF uses some additional section flags. */
|
||||
#define STYP_RDATA 0x100
|
||||
#define STYP_SDATA 0x200
|
||||
#define STYP_SBSS 0x400
|
||||
#define STYP_GOT 0x1000
|
||||
#define STYP_DYNAMIC 0x2000
|
||||
#define STYP_DYNSYM 0x4000
|
||||
#define STYP_RELDYN 0x8000
|
||||
#define STYP_DYNSTR 0x10000
|
||||
#define STYP_HASH 0x20000
|
||||
#define STYP_LIBLIST 0x40000
|
||||
#define STYP_CONFLIC 0x100000
|
||||
#define STYP_ECOFF_FINI 0x1000000
|
||||
#define STYP_EXTENDESC 0x2000000 /* 0x02FFF000 bits => scn type, rest clr */
|
||||
#define STYP_LITA 0x4000000
|
||||
#define STYP_LIT8 0x8000000
|
||||
#define STYP_LIT4 0x10000000
|
||||
#define STYP_ECOFF_LIB 0x40000000
|
||||
#define STYP_ECOFF_INIT 0x80000000
|
||||
#define STYP_OTHER_LOAD (STYP_ECOFF_INIT | STYP_ECOFF_FINI)
|
||||
|
||||
/* extended section types */
|
||||
#define STYP_COMMENT 0x2100000
|
||||
#define STYP_RCONST 0x2200000
|
||||
#define STYP_XDATA 0x2400000
|
||||
#define STYP_PDATA 0x2800000
|
||||
|
||||
/* The linker needs a section to hold small common variables while
|
||||
linking. There is no convenient way to create it when the linker
|
||||
needs it, so we always create one for each BFD. We then avoid
|
||||
writing it out. */
|
||||
#define SCOMMON ".scommon"
|
||||
|
||||
/* If the extern bit in a reloc is 1, then r_symndx is an index into
|
||||
the external symbol table. If the extern bit is 0, then r_symndx
|
||||
indicates a section, and is one of the following values. */
|
||||
#define RELOC_SECTION_NONE 0
|
||||
#define RELOC_SECTION_TEXT 1
|
||||
#define RELOC_SECTION_RDATA 2
|
||||
#define RELOC_SECTION_DATA 3
|
||||
#define RELOC_SECTION_SDATA 4
|
||||
#define RELOC_SECTION_SBSS 5
|
||||
#define RELOC_SECTION_BSS 6
|
||||
#define RELOC_SECTION_INIT 7
|
||||
#define RELOC_SECTION_LIT8 8
|
||||
#define RELOC_SECTION_LIT4 9
|
||||
#define RELOC_SECTION_XDATA 10
|
||||
#define RELOC_SECTION_PDATA 11
|
||||
#define RELOC_SECTION_FINI 12
|
||||
#define RELOC_SECTION_LITA 13
|
||||
#define RELOC_SECTION_ABS 14
|
||||
#define RELOC_SECTION_RCONST 15
|
||||
|
||||
#define NUM_RELOC_SECTIONS 16
|
||||
|
||||
/********************** STABS **********************/
|
||||
|
||||
/* gcc uses mips-tfile to output type information in special stabs
|
||||
entries. These must match the corresponding definition in
|
||||
gcc/config/mips.h. At some point, these should probably go into a
|
||||
shared include file, but currently gcc and gdb do not share any
|
||||
directories. */
|
||||
#define CODE_MASK 0x8F300
|
||||
#define ECOFF_IS_STAB(sym) (((sym)->index & 0xFFF00) == CODE_MASK)
|
||||
#define ECOFF_MARK_STAB(code) ((code)+CODE_MASK)
|
||||
#define ECOFF_UNMARK_STAB(code) ((code)-CODE_MASK)
|
||||
#define STABS_SYMBOL "@stabs"
|
||||
|
||||
/********************** COFF **********************/
|
||||
|
||||
/* gcc also uses mips-tfile to output COFF debugging information.
|
||||
These are the values it uses when outputting the .type directive.
|
||||
These should also be in a shared include file. */
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
/********************** AUX **********************/
|
||||
|
||||
/* The auxiliary type information is the same on all known ECOFF
|
||||
targets. I can't see any reason that it would ever change, so I am
|
||||
going to gamble and define the external structures here, in the
|
||||
target independent ECOFF header file. The internal forms are
|
||||
defined in coff/sym.h, which was originally donated by MIPS
|
||||
Computer Systems. */
|
||||
|
||||
/* Type information external record */
|
||||
|
||||
struct tir_ext {
|
||||
unsigned char t_bits1[1];
|
||||
unsigned char t_tq45[1];
|
||||
unsigned char t_tq01[1];
|
||||
unsigned char t_tq23[1];
|
||||
};
|
||||
|
||||
#define TIR_BITS1_FBITFIELD_BIG ((unsigned int) 0x80)
|
||||
#define TIR_BITS1_FBITFIELD_LITTLE ((unsigned int) 0x01)
|
||||
|
||||
#define TIR_BITS1_CONTINUED_BIG ((unsigned int) 0x40)
|
||||
#define TIR_BITS1_CONTINUED_LITTLE ((unsigned int) 0x02)
|
||||
|
||||
#define TIR_BITS1_BT_BIG ((unsigned int) 0x3F)
|
||||
#define TIR_BITS1_BT_SH_BIG 0
|
||||
#define TIR_BITS1_BT_LITTLE ((unsigned int) 0xFC)
|
||||
#define TIR_BITS1_BT_SH_LITTLE 2
|
||||
|
||||
#define TIR_BITS_TQ4_BIG ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ4_SH_BIG 4
|
||||
#define TIR_BITS_TQ5_BIG ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ5_SH_BIG 0
|
||||
#define TIR_BITS_TQ4_LITTLE ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ4_SH_LITTLE 0
|
||||
#define TIR_BITS_TQ5_LITTLE ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ5_SH_LITTLE 4
|
||||
|
||||
#define TIR_BITS_TQ0_BIG ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ0_SH_BIG 4
|
||||
#define TIR_BITS_TQ1_BIG ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ1_SH_BIG 0
|
||||
#define TIR_BITS_TQ0_LITTLE ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ0_SH_LITTLE 0
|
||||
#define TIR_BITS_TQ1_LITTLE ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ1_SH_LITTLE 4
|
||||
|
||||
#define TIR_BITS_TQ2_BIG ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ2_SH_BIG 4
|
||||
#define TIR_BITS_TQ3_BIG ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ3_SH_BIG 0
|
||||
#define TIR_BITS_TQ2_LITTLE ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ2_SH_LITTLE 0
|
||||
#define TIR_BITS_TQ3_LITTLE ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ3_SH_LITTLE 4
|
||||
|
||||
/* Relative symbol external record */
|
||||
|
||||
struct rndx_ext {
|
||||
unsigned char r_bits[4];
|
||||
};
|
||||
|
||||
#define RNDX_BITS0_RFD_SH_LEFT_BIG 4
|
||||
#define RNDX_BITS1_RFD_BIG ((unsigned int) 0xF0)
|
||||
#define RNDX_BITS1_RFD_SH_BIG 4
|
||||
|
||||
#define RNDX_BITS0_RFD_SH_LEFT_LITTLE 0
|
||||
#define RNDX_BITS1_RFD_LITTLE ((unsigned int) 0x0F)
|
||||
#define RNDX_BITS1_RFD_SH_LEFT_LITTLE 8
|
||||
|
||||
#define RNDX_BITS1_INDEX_BIG ((unsigned int) 0x0F)
|
||||
#define RNDX_BITS1_INDEX_SH_LEFT_BIG 16
|
||||
#define RNDX_BITS2_INDEX_SH_LEFT_BIG 8
|
||||
#define RNDX_BITS3_INDEX_SH_LEFT_BIG 0
|
||||
|
||||
#define RNDX_BITS1_INDEX_LITTLE ((unsigned int) 0xF0)
|
||||
#define RNDX_BITS1_INDEX_SH_LITTLE 4
|
||||
#define RNDX_BITS2_INDEX_SH_LEFT_LITTLE 4
|
||||
#define RNDX_BITS3_INDEX_SH_LEFT_LITTLE 12
|
||||
|
||||
/* Auxiliary symbol information external record */
|
||||
|
||||
union aux_ext {
|
||||
struct tir_ext a_ti;
|
||||
struct rndx_ext a_rndx;
|
||||
unsigned char a_dnLow[4];
|
||||
unsigned char a_dnHigh[4];
|
||||
unsigned char a_isym[4];
|
||||
unsigned char a_iss[4];
|
||||
unsigned char a_width[4];
|
||||
unsigned char a_count[4];
|
||||
};
|
||||
|
||||
#define AUX_GET_ANY(bigend, ax, field) \
|
||||
((bigend) ? bfd_getb32 ((ax)->field) : bfd_getl32 ((ax)->field))
|
||||
|
||||
#define AUX_GET_DNLOW(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnLow)
|
||||
#define AUX_GET_DNHIGH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnHigh)
|
||||
#define AUX_GET_ISYM(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_isym)
|
||||
#define AUX_GET_ISS(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_iss)
|
||||
#define AUX_GET_WIDTH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_width)
|
||||
#define AUX_GET_COUNT(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_count)
|
||||
|
||||
#define AUX_PUT_ANY(bigend, val, ax, field) \
|
||||
((bigend) \
|
||||
? (bfd_putb32 ((bfd_vma) (val), (ax)->field), 0) \
|
||||
: (bfd_putl32 ((bfd_vma) (val), (ax)->field), 0))
|
||||
|
||||
#define AUX_PUT_DNLOW(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_dnLow)
|
||||
#define AUX_PUT_DNHIGH(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_dnHigh)
|
||||
#define AUX_PUT_ISYM(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_isym)
|
||||
#define AUX_PUT_ISS(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_iss)
|
||||
#define AUX_PUT_WIDTH(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_width)
|
||||
#define AUX_PUT_COUNT(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_count)
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
/* For efficiency, gdb deals directly with the unswapped symbolic
|
||||
information (that way it only takes the time to swap information
|
||||
that it really needs to read). gdb originally retrieved the
|
||||
information directly from the BFD backend information, but that
|
||||
strategy, besides being sort of ugly, does not work for MIPS ELF,
|
||||
which also uses ECOFF debugging information. This structure holds
|
||||
pointers to the (mostly) unswapped symbolic information. */
|
||||
|
||||
struct ecoff_debug_info
|
||||
{
|
||||
/* The swapped ECOFF symbolic header. */
|
||||
HDRR symbolic_header;
|
||||
|
||||
/* Pointers to the unswapped symbolic information. Note that the
|
||||
pointers to external structures point to different sorts of
|
||||
information on different ECOFF targets. The ecoff_debug_swap
|
||||
structure provides the sizes of the structures and the functions
|
||||
needed to swap the information in and out. These pointers are
|
||||
all pointers to arrays, not single structures. They will be NULL
|
||||
if there are no instances of the relevant structure. These
|
||||
fields are also used by the assembler to output ECOFF debugging
|
||||
information. */
|
||||
unsigned char *line;
|
||||
void *external_dnr; /* struct dnr_ext */
|
||||
void *external_pdr; /* struct pdr_ext */
|
||||
void *external_sym; /* struct sym_ext */
|
||||
void *external_opt; /* struct opt_ext */
|
||||
union aux_ext *external_aux;
|
||||
char *ss;
|
||||
char *ssext;
|
||||
void *external_fdr; /* struct fdr_ext */
|
||||
void *external_rfd; /* struct rfd_ext */
|
||||
void *external_ext; /* struct ext_ext */
|
||||
|
||||
/* These fields are used when linking. They may disappear at some
|
||||
point. */
|
||||
char *ssext_end;
|
||||
void *external_ext_end;
|
||||
|
||||
/* When linking, this field holds a mapping from the input FDR
|
||||
numbers to the output numbers, and is used when writing out the
|
||||
external symbols. It is NULL if no mapping is required. */
|
||||
RFDT *ifdmap;
|
||||
|
||||
/* The swapped FDR information. Currently this is never NULL, but
|
||||
code using this structure should probably double-check in case
|
||||
this changes in the future. This is a pointer to an array, not a
|
||||
single structure. */
|
||||
FDR *fdr;
|
||||
};
|
||||
|
||||
/* These structures are used by the ECOFF find_nearest_line function. */
|
||||
|
||||
struct ecoff_fdrtab_entry
|
||||
{
|
||||
/* Base address in .text of this FDR. */
|
||||
bfd_vma base_addr;
|
||||
FDR *fdr;
|
||||
};
|
||||
|
||||
struct ecoff_find_line
|
||||
{
|
||||
/* Allocated memory to hold function and file names. */
|
||||
char *find_buffer;
|
||||
|
||||
/* FDR table, sorted by address: */
|
||||
long fdrtab_len;
|
||||
struct ecoff_fdrtab_entry *fdrtab;
|
||||
|
||||
/* Cache entry for most recently found line information. The sect
|
||||
field is NULL if this cache does not contain valid information. */
|
||||
struct
|
||||
{
|
||||
asection *sect;
|
||||
bfd_vma start;
|
||||
bfd_vma stop;
|
||||
const char *filename;
|
||||
const char *functionname;
|
||||
unsigned int line_num;
|
||||
} cache;
|
||||
};
|
||||
|
||||
/********************** SWAPPING **********************/
|
||||
|
||||
/* The generic ECOFF code needs to be able to swap debugging
|
||||
information in and out in the specific format used by a particular
|
||||
ECOFF implementation. This structure provides the information
|
||||
needed to do this. */
|
||||
|
||||
struct ecoff_debug_swap
|
||||
{
|
||||
/* Symbol table magic number. */
|
||||
int sym_magic;
|
||||
/* Alignment of debugging information. E.g., 4. */
|
||||
bfd_size_type debug_align;
|
||||
/* Sizes of external symbolic information. */
|
||||
bfd_size_type external_hdr_size;
|
||||
bfd_size_type external_dnr_size;
|
||||
bfd_size_type external_pdr_size;
|
||||
bfd_size_type external_sym_size;
|
||||
bfd_size_type external_opt_size;
|
||||
bfd_size_type external_fdr_size;
|
||||
bfd_size_type external_rfd_size;
|
||||
bfd_size_type external_ext_size;
|
||||
/* Functions to swap in external symbolic data. */
|
||||
void (*swap_hdr_in) (bfd *, void *, HDRR *);
|
||||
void (*swap_dnr_in) (bfd *, void *, DNR *);
|
||||
void (*swap_pdr_in) (bfd *, void *, PDR *);
|
||||
void (*swap_sym_in) (bfd *, void *, SYMR *);
|
||||
void (*swap_opt_in) (bfd *, void *, OPTR *);
|
||||
void (*swap_fdr_in) (bfd *, void *, FDR *);
|
||||
void (*swap_rfd_in) (bfd *, void *, RFDT *);
|
||||
void (*swap_ext_in) (bfd *, void *, EXTR *);
|
||||
void (*swap_tir_in) (int, const struct tir_ext *, TIR *);
|
||||
void (*swap_rndx_in) (int, const struct rndx_ext *, RNDXR *);
|
||||
/* Functions to swap out external symbolic data. */
|
||||
void (*swap_hdr_out) (bfd *, const HDRR *, void *);
|
||||
void (*swap_dnr_out) (bfd *, const DNR *, void *);
|
||||
void (*swap_pdr_out) (bfd *, const PDR *, void *);
|
||||
void (*swap_sym_out) (bfd *, const SYMR *, void *);
|
||||
void (*swap_opt_out) (bfd *, const OPTR *, void *);
|
||||
void (*swap_fdr_out) (bfd *, const FDR *, void *);
|
||||
void (*swap_rfd_out) (bfd *, const RFDT *, void *);
|
||||
void (*swap_ext_out) (bfd *, const EXTR *, void *);
|
||||
void (*swap_tir_out) (int, const TIR *, struct tir_ext *);
|
||||
void (*swap_rndx_out) (int, const RNDXR *, struct rndx_ext *);
|
||||
/* Function to read symbol data and set up pointers in
|
||||
ecoff_debug_info structure. The section argument is used for
|
||||
ELF, not straight ECOFF. */
|
||||
bfd_boolean (*read_debug_info) (bfd *, asection *, struct ecoff_debug_info *);
|
||||
};
|
||||
|
||||
#endif /* ! defined (ECOFF_H) */
|
||||
@@ -1,254 +0,0 @@
|
||||
/* external.h -- External COFF structures
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef COFF_EXTERNAL_H
|
||||
#define COFF_EXTERNAL_H
|
||||
|
||||
#ifndef DO_NOT_DEFINE_FILHDR
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr
|
||||
{
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
#endif
|
||||
|
||||
#ifndef DO_NOT_DEFINE_AOUTHDR
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
typedef struct external_aouthdr
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
#define AOUTHDRSZ 28
|
||||
#define AOUTSZ 28
|
||||
#endif
|
||||
|
||||
#ifndef DO_NOT_DEFINE_SCNHDR
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
struct external_scnhdr
|
||||
{
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries */
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/* Names of "special" sections. */
|
||||
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _COMMENT ".comment"
|
||||
#define _LIB ".lib"
|
||||
#endif /* not DO_NOT_DEFINE_SCNHDR */
|
||||
|
||||
#ifndef DO_NOT_DEFINE_LINENO
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
#ifndef L_LNNO_SIZE
|
||||
#error L_LNNO_SIZE needs to be defined
|
||||
#endif
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
Line numbers are grouped on a per function basis; first entry in a function
|
||||
grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
symbol table index of the function name. */
|
||||
struct external_lineno
|
||||
{
|
||||
union
|
||||
{
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
|
||||
char l_lnno[L_LNNO_SIZE]; /* line number */
|
||||
};
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ (4 + L_LNNO_SIZE)
|
||||
|
||||
#if L_LNNO_SIZE == 4
|
||||
#define GET_LINENO_LNNO(abfd, ext) H_GET_32 (abfd, (ext->l_lnno))
|
||||
#define PUT_LINENO_LNNO(abfd, val, ext) H_PUT_32 (abfd, val, (ext->l_lnno))
|
||||
#endif
|
||||
#if L_LNNO_SIZE == 2
|
||||
#define GET_LINENO_LNNO(abfd, ext) H_GET_16 (abfd, (ext->l_lnno))
|
||||
#define PUT_LINENO_LNNO(abfd, val, ext) H_PUT_16 (abfd, val, (ext->l_lnno))
|
||||
#endif
|
||||
|
||||
#endif /* not DO_NOT_DEFINE_LINENO */
|
||||
|
||||
#ifndef DO_NOT_DEFINE_SYMENT
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#ifndef E_FILNMLEN
|
||||
#define E_FILNMLEN 14
|
||||
#endif
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union
|
||||
{
|
||||
char e_name[E_SYMNMLEN];
|
||||
|
||||
struct
|
||||
{
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
|
||||
#ifndef N_BTMASK
|
||||
#define N_BTMASK 0xf
|
||||
#endif
|
||||
|
||||
#ifndef N_TMASK
|
||||
#define N_TMASK 0x30
|
||||
#endif
|
||||
|
||||
#ifndef N_BTSHFT
|
||||
#define N_BTSHFT 4
|
||||
#endif
|
||||
|
||||
#ifndef N_TSHIFT
|
||||
#define N_TSHIFT 2
|
||||
#endif
|
||||
|
||||
#endif /* not DO_NOT_DEFINE_SYMENT */
|
||||
|
||||
#ifndef DO_NOT_DEFINE_AUXENT
|
||||
|
||||
union external_auxent
|
||||
{
|
||||
struct
|
||||
{
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
|
||||
char x_fsize[4]; /* size of function */
|
||||
|
||||
} x_misc;
|
||||
|
||||
union
|
||||
{
|
||||
struct /* if ISFCN, tag, or .bb */
|
||||
{
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
|
||||
struct /* if ISARY, up to 4 dimen. */
|
||||
{
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
|
||||
} x_fcnary;
|
||||
|
||||
char x_tvndx[2]; /* tv index */
|
||||
|
||||
} x_sym;
|
||||
|
||||
union
|
||||
{
|
||||
char x_fname[E_FILNMLEN];
|
||||
|
||||
struct
|
||||
{
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
|
||||
} x_file;
|
||||
|
||||
struct
|
||||
{
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
#ifdef INCLUDE_COMDAT_FIELDS_IN_AUXENT
|
||||
char x_checksum[4]; /* section COMDAT checksum */
|
||||
char x_associated[2]; /* COMDAT associated section index */
|
||||
char x_comdat[1]; /* COMDAT selection number */
|
||||
#endif
|
||||
} x_scn;
|
||||
|
||||
struct
|
||||
{
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
};
|
||||
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
#define _ETEXT "etext"
|
||||
|
||||
#endif /* not DO_NOT_DEFINE_AUXENT */
|
||||
|
||||
#endif /* COFF_EXTERNAL_H */
|
||||
@@ -1,37 +0,0 @@
|
||||
/* COFF information for PC running go32.
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define STUBSIZE 2048
|
||||
|
||||
struct external_filehdr_go32_exe
|
||||
{
|
||||
char stub[STUBSIZE];/* the stub to load the image */
|
||||
/* the standard COFF header */
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
#undef FILHDR
|
||||
#define FILHDR struct external_filehdr_go32_exe
|
||||
#undef FILHSZ
|
||||
#define FILHSZ STUBSIZE+20
|
||||
@@ -1,54 +0,0 @@
|
||||
/* coff information for Renesas H8/300 and H8/300-H
|
||||
|
||||
Copyright 2001, 2003 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define L_LNNO_SIZE 4
|
||||
#include "coff/external.h"
|
||||
|
||||
#define H8300MAGIC 0x8300
|
||||
#define H8300HMAGIC 0x8301
|
||||
#define H8300SMAGIC 0x8302
|
||||
#define H8300HNMAGIC 0x8303
|
||||
#define H8300SNMAGIC 0x8304
|
||||
|
||||
#define H8300BADMAG(x) (((x).f_magic != H8300MAGIC))
|
||||
#define H8300HBADMAG(x) (((x).f_magic != H8300HMAGIC))
|
||||
#define H8300SBADMAG(x) (((x).f_magic != H8300SMAGIC))
|
||||
#define H8300HNBADMAG(x) (((x).f_magic != H8300HNMAGIC))
|
||||
#define H8300SNBADMAG(x) (((x).f_magic != H8300SNMAGIC))
|
||||
|
||||
/* Relocation directives. */
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the h8 don't have room in the instruction for the entire
|
||||
offset - eg the strange jump and high page addressing modes. */
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/* coff information for Renesas H8/500
|
||||
|
||||
Copyright 2001, 2003 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define L_LNNO_SIZE 4
|
||||
#include "coff/external.h"
|
||||
|
||||
#define H8500MAGIC 0x8500
|
||||
|
||||
#define H8500BADMAG(x) ((0xffff && ((x).f_magic) != H8500MAGIC))
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the h8 don't have room in the instruction for the entire
|
||||
offset - eg the strange jump and high page addressing modes. */
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/* coff information for Intel 386/486.
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define L_LNNO_SIZE 2
|
||||
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
|
||||
#include "coff/external.h"
|
||||
|
||||
/* Bits for f_flags:
|
||||
F_RELFLG relocation info stripped from file
|
||||
F_EXEC file is executable (no unresolved external references)
|
||||
F_LNNO line numbers stripped from file
|
||||
F_LSYMS local symbols stripped from file
|
||||
F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
|
||||
#define I386MAGIC 0x14c
|
||||
#define I386PTXMAGIC 0x154
|
||||
#define I386AIXMAGIC 0x175
|
||||
|
||||
/* This is Lynx's all-platform magic number for executables. */
|
||||
|
||||
#define LYNXCOFFMAGIC 0415
|
||||
|
||||
#define I386BADMAG(x) ( ((x).f_magic != I386MAGIC) \
|
||||
&& (x).f_magic != I386AIXMAGIC \
|
||||
&& (x).f_magic != I386PTXMAGIC \
|
||||
&& (x).f_magic != LYNXCOFFMAGIC)
|
||||
|
||||
#define OMAGIC 0404 /* object files, eg as output */
|
||||
#define ZMAGIC 0413 /* demand load format, eg normal ld output */
|
||||
#define STMAGIC 0401 /* target shlib */
|
||||
#define SHMAGIC 0443 /* host shlib */
|
||||
|
||||
/* define some NT default values */
|
||||
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
|
||||
#define NT_SECTION_ALIGNMENT 0x1000
|
||||
#define NT_FILE_ALIGNMENT 0x200
|
||||
#define NT_DEF_RESERVE 0x100000
|
||||
#define NT_DEF_COMMIT 0x1000
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
/* COFF information for the Intel i860.
|
||||
|
||||
Copyright 2001, 2003 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* This file was hacked from i386.h [dolan@ssd.intel.com] */
|
||||
|
||||
#define L_LNNO_SIZE 2
|
||||
#include "coff/external.h"
|
||||
|
||||
/* Bits for f_flags:
|
||||
F_RELFLG relocation info stripped from file
|
||||
F_EXEC file is executable (no unresolved external references)
|
||||
F_LNNO line numbers stripped from file
|
||||
F_LSYMS local symbols stripped from file
|
||||
F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
|
||||
#define I860MAGIC 0x14d
|
||||
|
||||
#define I860BADMAG(x) ((x).f_magic != I860MAGIC)
|
||||
|
||||
#undef AOUTSZ
|
||||
#define AOUTSZ 36
|
||||
|
||||
/* FIXME: What are the a.out magic numbers? */
|
||||
|
||||
#define _ETEXT "etext"
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
/* The relocation directory entry types.
|
||||
PAIR : The low half that follows relates to the preceeding HIGH[ADJ].
|
||||
HIGH : The high half of a 32-bit constant.
|
||||
LOWn : The low half, insn bits 15..(n-1), 2^n-byte aligned.
|
||||
SPLITn : The low half, insn bits 20..16 and 10..(n-1), 2^n-byte aligned.
|
||||
HIGHADJ: Similar to HIGH, but with adjustment.
|
||||
BRADDR : 26-bit branch displacement.
|
||||
|
||||
Note: The Intel assembler manual lists LOW4 as one of the
|
||||
relocation types, but it appears to be useless for the i860.
|
||||
We will recognize it anyway, just in case it actually appears in
|
||||
any object files. */
|
||||
|
||||
enum {
|
||||
COFF860_R_PAIR = 0x1c,
|
||||
COFF860_R_HIGH = 0x1e,
|
||||
COFF860_R_LOW0 = 0x1f,
|
||||
COFF860_R_LOW1 = 0x20,
|
||||
COFF860_R_LOW2 = 0x21,
|
||||
COFF860_R_LOW3 = 0x22,
|
||||
COFF860_R_LOW4 = 0x23,
|
||||
COFF860_R_SPLIT0 = 0x24,
|
||||
COFF860_R_SPLIT1 = 0x25,
|
||||
COFF860_R_SPLIT2 = 0x26,
|
||||
COFF860_R_HIGHADJ = 0x27,
|
||||
COFF860_R_BRADDR = 0x28
|
||||
};
|
||||
|
||||
@@ -1,319 +0,0 @@
|
||||
/* coff information for 80960. Origins: Intel corp, natch.
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* NOTE: Tagentries (cf TAGBITS) are no longer used by the 960 */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr
|
||||
{
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
#define OMAGIC (0407) /* old impure format. data immediately
|
||||
follows text. both sections are rw. */
|
||||
#define NMAGIC (0410) /* split i&d, read-only text */
|
||||
|
||||
/*
|
||||
* Intel 80960 (I960) processor flags.
|
||||
* F_I960TYPE == mask for processor type field.
|
||||
*/
|
||||
|
||||
#define F_I960TYPE (0xf000)
|
||||
#define F_I960CORE (0x1000)
|
||||
#define F_I960KB (0x2000)
|
||||
#define F_I960SB (0x2000)
|
||||
#define F_I960MC (0x3000)
|
||||
#define F_I960XA (0x4000)
|
||||
#define F_I960CA (0x5000)
|
||||
#define F_I960KA (0x6000)
|
||||
#define F_I960SA (0x6000)
|
||||
#define F_I960JX (0x7000)
|
||||
#define F_I960HX (0x8000)
|
||||
|
||||
|
||||
/** i80960 Magic Numbers
|
||||
*/
|
||||
|
||||
#define I960ROMAGIC (0x160) /* read-only text segments */
|
||||
#define I960RWMAGIC (0x161) /* read-write text segments */
|
||||
|
||||
#define I960BADMAG(x) (((x).f_magic!=I960ROMAGIC) && ((x).f_magic!=I960RWMAGIC))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long phys_addr;
|
||||
unsigned long bitarray;
|
||||
} TAGBITS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
char tagentries[4]; /* number of tag entries to follow */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
/* return a pointer to the tag bits array */
|
||||
|
||||
#define TAGPTR(aout) ((TAGBITS *) (&(aout.tagentries)+1))
|
||||
|
||||
/* compute size of a header */
|
||||
|
||||
/*#define AOUTSZ(aout) (sizeof(AOUTHDR)+(aout.tagentries*sizeof(TAGBITS)))*/
|
||||
#define AOUTSZ 32
|
||||
#define AOUTHDRSZ 32
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
struct external_scnhdr
|
||||
{
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
char s_align[4]; /* section alignment */
|
||||
};
|
||||
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 44
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno
|
||||
{
|
||||
union
|
||||
{
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
|
||||
char l_lnno[2]; /* line number */
|
||||
char padding[2]; /* force alignment */
|
||||
};
|
||||
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 8
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union
|
||||
{
|
||||
char e_name[E_SYMNMLEN];
|
||||
|
||||
struct
|
||||
{
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_flags[2];
|
||||
char e_type[4];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
char pad2[2];
|
||||
};
|
||||
|
||||
#define N_BTMASK (0x1f)
|
||||
#define N_TMASK (0x60)
|
||||
#define N_BTSHFT (5)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
union external_auxent
|
||||
{
|
||||
struct
|
||||
{
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
|
||||
char x_fsize[4]; /* size of function */
|
||||
|
||||
} x_misc;
|
||||
|
||||
union
|
||||
{
|
||||
struct /* if ISFCN, tag, or .bb */
|
||||
{
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
|
||||
struct /* if ISARY, up to 4 dimen. */
|
||||
{
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
|
||||
} x_fcnary;
|
||||
|
||||
char x_tvndx[2]; /* tv index */
|
||||
|
||||
} x_sym;
|
||||
|
||||
union
|
||||
{
|
||||
char x_fname[E_FILNMLEN];
|
||||
|
||||
struct
|
||||
{
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
|
||||
} x_file;
|
||||
|
||||
struct
|
||||
{
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
|
||||
} x_scn;
|
||||
|
||||
struct
|
||||
{
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
/******************************************
|
||||
* I960-specific *2nd* aux. entry formats
|
||||
******************************************/
|
||||
struct
|
||||
{
|
||||
/* This is a very old typo that keeps getting propagated. */
|
||||
#define x_stdindx x_stindx
|
||||
char x_stindx[4]; /* sys. table entry */
|
||||
} x_sc; /* system call entry */
|
||||
|
||||
struct
|
||||
{
|
||||
char x_balntry[4]; /* BAL entry point */
|
||||
} x_bal; /* BAL-callable function */
|
||||
|
||||
struct
|
||||
{
|
||||
char x_timestamp[4]; /* time stamp */
|
||||
char x_idstring[20]; /* producer identity string */
|
||||
|
||||
} x_ident; /* Producer ident info */
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 24
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 24
|
||||
|
||||
# define _ETEXT "_etext"
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
char pad[2];
|
||||
};
|
||||
|
||||
/* r_type values for the i960. */
|
||||
|
||||
/* The i960 uses R_RELLONG, which is defined in internal.h as 0x11.
|
||||
It is an absolute 32 bit relocation. */
|
||||
|
||||
#define R_IPRMED (0x19) /* 24-bit ip-relative relocation */
|
||||
#define R_OPTCALL (0x1b) /* 32-bit optimizable call (leafproc/sysproc) */
|
||||
#define R_OPTCALLX (0x1c) /* 64-bit optimizable call (leafproc/sysproc) */
|
||||
|
||||
/* The following relocation types are defined use by relaxing linkers,
|
||||
which convert 32 bit calls (which require a 64 bit instruction)
|
||||
into 24 bit calls (which require a 32 bit instruction) when
|
||||
possible. It will be possible whenever the target of the call is
|
||||
within a 24 bit range of the call instruction.
|
||||
|
||||
It is always safe to ignore these relocations. They only serve to
|
||||
mark points which the relaxing linker will have to consider. The
|
||||
assembler must ensure that the correct code is generated even if
|
||||
the relocations are ignored. In particular, this means that the
|
||||
R_IPR13 relocation may not appear with an external symbol. */
|
||||
|
||||
#define R_IPR13 (0x1d) /* 13 bit ip-relative branch */
|
||||
#define R_ALIGN (0x1e) /* alignment marker. This has no
|
||||
associated symbol. Instead, the
|
||||
r_symndx field indicates the
|
||||
require alignment at this point in
|
||||
the file. It must be a power of 2. */
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 12
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
/* coff information for HP/Intel IA-64.
|
||||
|
||||
Copyright 2000 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define DO_NOT_DEFINE_AOUTHDR
|
||||
#define L_LNNO_SIZE 2
|
||||
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
|
||||
#include "coff/external.h"
|
||||
|
||||
#define IA64MAGIC 0x200
|
||||
|
||||
#define IA64BADMAG(x) (((x).f_magic != IA64MAGIC))
|
||||
|
||||
/* Bits for f_flags:
|
||||
* F_RELFLG relocation info stripped from file
|
||||
* F_EXEC file is executable (no unresolved external references)
|
||||
* F_LNNO line numbers stripped from file
|
||||
* F_LSYMS local symbols stripped from file
|
||||
* F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
|
||||
*/
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
#ifndef BFD64
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
#endif
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
#define PE32MAGIC 0x10b /* 32-bit image */
|
||||
#define PE32PMAGIC 0x20b /* 32-bit image inside 64-bit address space */
|
||||
|
||||
#define PE32PBADMAG(x) (((x).f_magic != PE32PMAGIC))
|
||||
|
||||
#define AOUTSZ 108
|
||||
#define AOUTHDRSZ 108
|
||||
|
||||
#define OMAGIC 0404 /* object files, eg as output */
|
||||
#define ZMAGIC 0413 /* demand load format, eg normal ld output */
|
||||
#define STMAGIC 0401 /* target shlib */
|
||||
#define SHMAGIC 0443 /* host shlib */
|
||||
|
||||
/* define some NT default values */
|
||||
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
|
||||
#define NT_SECTION_ALIGNMENT 0x1000
|
||||
#define NT_FILE_ALIGNMENT 0x200
|
||||
#define NT_DEF_RESERVE 0x100000
|
||||
#define NT_DEF_COMMIT 0x1000
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
@@ -1,752 +0,0 @@
|
||||
/* Internal format of COFF object file data structures, for GNU BFD.
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004. 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef GNU_COFF_INTERNAL_H
|
||||
#define GNU_COFF_INTERNAL_H 1
|
||||
|
||||
/* First, make "signed char" work, even on old compilers. */
|
||||
#ifndef signed
|
||||
#ifndef __STDC__
|
||||
#define signed /**/
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
/* extra stuff in a PE header. */
|
||||
|
||||
struct internal_extra_pe_filehdr
|
||||
{
|
||||
/* DOS header data follows for PE stuff */
|
||||
unsigned short e_magic; /* Magic number, 0x5a4d */
|
||||
unsigned short e_cblp; /* Bytes on last page of file, 0x90 */
|
||||
unsigned short e_cp; /* Pages in file, 0x3 */
|
||||
unsigned short e_crlc; /* Relocations, 0x0 */
|
||||
unsigned short e_cparhdr; /* Size of header in paragraphs, 0x4 */
|
||||
unsigned short e_minalloc; /* Minimum extra paragraphs needed, 0x0 */
|
||||
unsigned short e_maxalloc; /* Maximum extra paragraphs needed, 0xFFFF */
|
||||
unsigned short e_ss; /* Initial (relative) SS value, 0x0 */
|
||||
unsigned short e_sp; /* Initial SP value, 0xb8 */
|
||||
unsigned short e_csum; /* Checksum, 0x0 */
|
||||
unsigned short e_ip; /* Initial IP value, 0x0 */
|
||||
unsigned short e_cs; /* Initial (relative) CS value, 0x0 */
|
||||
unsigned short e_lfarlc; /* File address of relocation table, 0x40 */
|
||||
unsigned short e_ovno; /* Overlay number, 0x0 */
|
||||
unsigned short e_res[4]; /* Reserved words, all 0x0 */
|
||||
unsigned short e_oemid; /* OEM identifier (for e_oeminfo), 0x0 */
|
||||
unsigned short e_oeminfo; /* OEM information; e_oemid specific, 0x0 */
|
||||
unsigned short e_res2[10]; /* Reserved words, all 0x0 */
|
||||
bfd_vma e_lfanew; /* File address of new exe header, 0x80 */
|
||||
unsigned long dos_message[16]; /* text which always follows dos header */
|
||||
bfd_vma nt_signature; /* required NT signature, 0x4550 */
|
||||
};
|
||||
|
||||
struct internal_filehdr
|
||||
{
|
||||
struct internal_extra_pe_filehdr pe;
|
||||
|
||||
/* Standard coff internal info. */
|
||||
unsigned short f_magic; /* magic number */
|
||||
unsigned short f_nscns; /* number of sections */
|
||||
long f_timdat; /* time & date stamp */
|
||||
bfd_vma f_symptr; /* file pointer to symtab */
|
||||
long f_nsyms; /* number of symtab entries */
|
||||
unsigned short f_opthdr; /* sizeof(optional hdr) */
|
||||
unsigned short f_flags; /* flags */
|
||||
unsigned short f_target_id; /* (TI COFF specific) */
|
||||
};
|
||||
|
||||
|
||||
/* Bits for f_flags:
|
||||
F_RELFLG relocation info stripped from file
|
||||
F_EXEC file is executable (no unresolved external references)
|
||||
F_LNNO line numbers stripped from file
|
||||
F_LSYMS local symbols stripped from file
|
||||
F_AR16WR file is 16-bit little-endian
|
||||
F_AR32WR file is 32-bit little-endian
|
||||
F_AR32W file is 32-bit big-endian
|
||||
F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports
|
||||
F_SHROBJ rs/6000 aix: file is a shared object
|
||||
F_DLL PE format DLL. */
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
#define F_AR16WR (0x0080)
|
||||
#define F_AR32WR (0x0100)
|
||||
#define F_AR32W (0x0200)
|
||||
#define F_DYNLOAD (0x1000)
|
||||
#define F_SHROBJ (0x2000)
|
||||
#define F_DLL (0x2000)
|
||||
|
||||
/* Extra structure which is used in the optional header. */
|
||||
typedef struct _IMAGE_DATA_DIRECTORY
|
||||
{
|
||||
bfd_vma VirtualAddress;
|
||||
long Size;
|
||||
} IMAGE_DATA_DIRECTORY;
|
||||
#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
|
||||
|
||||
/* Default image base for NT. */
|
||||
#define NT_EXE_IMAGE_BASE 0x400000
|
||||
#define NT_DLL_IMAGE_BASE 0x10000000
|
||||
|
||||
/* Default image base for BeOS. */
|
||||
#define BEOS_EXE_IMAGE_BASE 0x80000000
|
||||
#define BEOS_DLL_IMAGE_BASE 0x10000000
|
||||
|
||||
/* Extra stuff in a PE aouthdr */
|
||||
|
||||
#define PE_DEF_SECTION_ALIGNMENT 0x1000
|
||||
#ifndef PE_DEF_FILE_ALIGNMENT
|
||||
# define PE_DEF_FILE_ALIGNMENT 0x200
|
||||
#endif
|
||||
|
||||
struct internal_extra_pe_aouthdr
|
||||
{
|
||||
/* PE stuff */
|
||||
bfd_vma ImageBase; /* address of specific location in memory that
|
||||
file is located, NT default 0x10000 */
|
||||
|
||||
bfd_vma SectionAlignment; /* section alignment default 0x1000 */
|
||||
bfd_vma FileAlignment; /* file alignment default 0x200 */
|
||||
short MajorOperatingSystemVersion; /* minimum version of the operating */
|
||||
short MinorOperatingSystemVersion; /* system req'd for exe, default to 1*/
|
||||
short MajorImageVersion; /* user defineable field to store version of */
|
||||
short MinorImageVersion; /* exe or dll being created, default to 0 */
|
||||
short MajorSubsystemVersion; /* minimum subsystem version required to */
|
||||
short MinorSubsystemVersion; /* run exe; default to 3.1 */
|
||||
long Reserved1; /* seems to be 0 */
|
||||
long SizeOfImage; /* size of memory to allocate for prog */
|
||||
long SizeOfHeaders; /* size of PE header and section table */
|
||||
long CheckSum; /* set to 0 */
|
||||
short Subsystem;
|
||||
|
||||
/* type of subsystem exe uses for user interface,
|
||||
possible values:
|
||||
1 - NATIVE Doesn't require a subsystem
|
||||
2 - WINDOWS_GUI runs in Windows GUI subsystem
|
||||
3 - WINDOWS_CUI runs in Windows char sub. (console app)
|
||||
5 - OS2_CUI runs in OS/2 character subsystem
|
||||
7 - POSIX_CUI runs in Posix character subsystem */
|
||||
short DllCharacteristics; /* flags for DLL init, use 0 */
|
||||
bfd_vma SizeOfStackReserve; /* amount of memory to reserve */
|
||||
bfd_vma SizeOfStackCommit; /* amount of memory initially committed for
|
||||
initial thread's stack, default is 0x1000 */
|
||||
bfd_vma SizeOfHeapReserve; /* amount of virtual memory to reserve and */
|
||||
bfd_vma SizeOfHeapCommit; /* commit, don't know what to defaut it to */
|
||||
long LoaderFlags; /* can probably set to 0 */
|
||||
long NumberOfRvaAndSizes; /* number of entries in next entry, 16 */
|
||||
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
|
||||
};
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
struct internal_aouthdr
|
||||
{
|
||||
short magic; /* type of file */
|
||||
short vstamp; /* version stamp */
|
||||
bfd_vma tsize; /* text size in bytes, padded to FW bdry*/
|
||||
bfd_vma dsize; /* initialized data " " */
|
||||
bfd_vma bsize; /* uninitialized data " " */
|
||||
bfd_vma entry; /* entry pt. */
|
||||
bfd_vma text_start; /* base of text used for this file */
|
||||
bfd_vma data_start; /* base of data used for this file */
|
||||
|
||||
/* i960 stuff */
|
||||
unsigned long tagentries; /* number of tag entries to follow */
|
||||
|
||||
/* RS/6000 stuff */
|
||||
bfd_vma o_toc; /* address of TOC */
|
||||
short o_snentry; /* section number for entry point */
|
||||
short o_sntext; /* section number for text */
|
||||
short o_sndata; /* section number for data */
|
||||
short o_sntoc; /* section number for toc */
|
||||
short o_snloader; /* section number for loader section */
|
||||
short o_snbss; /* section number for bss */
|
||||
short o_algntext; /* max alignment for text */
|
||||
short o_algndata; /* max alignment for data */
|
||||
short o_modtype; /* Module type field, 1R,RE,RO */
|
||||
short o_cputype; /* Encoded CPU type */
|
||||
bfd_vma o_maxstack; /* max stack size allowed. */
|
||||
bfd_vma o_maxdata; /* max data size allowed. */
|
||||
|
||||
/* ECOFF stuff */
|
||||
bfd_vma bss_start; /* Base of bss section. */
|
||||
bfd_vma gp_value; /* GP register value. */
|
||||
unsigned long gprmask; /* General registers used. */
|
||||
unsigned long cprmask[4]; /* Coprocessor registers used. */
|
||||
unsigned long fprmask; /* Floating pointer registers used. */
|
||||
|
||||
/* Apollo stuff */
|
||||
long o_inlib; /* inlib data */
|
||||
long o_sri; /* Static Resource Information */
|
||||
long vid[2]; /* Version id */
|
||||
|
||||
struct internal_extra_pe_aouthdr pe;
|
||||
};
|
||||
|
||||
/********************** STORAGE CLASSES **********************/
|
||||
|
||||
/* This used to be defined as -1, but now n_sclass is unsigned. */
|
||||
#define C_EFCN 0xff /* physical end of function */
|
||||
#define C_NULL 0
|
||||
#define C_AUTO 1 /* automatic variable */
|
||||
#define C_EXT 2 /* external symbol */
|
||||
#define C_STAT 3 /* static */
|
||||
#define C_REG 4 /* register variable */
|
||||
#define C_EXTDEF 5 /* external definition */
|
||||
#define C_LABEL 6 /* label */
|
||||
#define C_ULABEL 7 /* undefined label */
|
||||
#define C_MOS 8 /* member of structure */
|
||||
#define C_ARG 9 /* function argument */
|
||||
#define C_STRTAG 10 /* structure tag */
|
||||
#define C_MOU 11 /* member of union */
|
||||
#define C_UNTAG 12 /* union tag */
|
||||
#define C_TPDEF 13 /* type definition */
|
||||
#define C_USTATIC 14 /* undefined static */
|
||||
#define C_ENTAG 15 /* enumeration tag */
|
||||
#define C_MOE 16 /* member of enumeration */
|
||||
#define C_REGPARM 17 /* register parameter */
|
||||
#define C_FIELD 18 /* bit field */
|
||||
#define C_AUTOARG 19 /* auto argument */
|
||||
#define C_LASTENT 20 /* dummy entry (end of block) */
|
||||
#define C_BLOCK 100 /* ".bb" or ".eb" */
|
||||
#define C_FCN 101 /* ".bf" or ".ef" */
|
||||
#define C_EOS 102 /* end of structure */
|
||||
#define C_FILE 103 /* file name */
|
||||
#define C_LINE 104 /* line # reformatted as symbol table entry */
|
||||
#define C_ALIAS 105 /* duplicate tag */
|
||||
#define C_HIDDEN 106 /* ext symbol in dmert public lib */
|
||||
|
||||
#if defined _AIX52 || defined AIX_WEAK_SUPPORT
|
||||
#define C_WEAKEXT 111 /* weak symbol -- AIX standard. */
|
||||
#else
|
||||
#define C_WEAKEXT 127 /* weak symbol -- GNU extension. */
|
||||
#endif
|
||||
|
||||
/* New storage classes for TI COFF */
|
||||
#define C_UEXT 19 /* Tentative external definition */
|
||||
#define C_STATLAB 20 /* Static load time label */
|
||||
#define C_EXTLAB 21 /* External load time label */
|
||||
#define C_SYSTEM 23 /* System Wide variable */
|
||||
|
||||
/* New storage classes for WINDOWS_NT */
|
||||
#define C_SECTION 104 /* section name */
|
||||
#define C_NT_WEAK 105 /* weak external */
|
||||
|
||||
/* New storage classes for 80960 */
|
||||
|
||||
/* C_LEAFPROC is obsolete. Use C_LEAFEXT or C_LEAFSTAT */
|
||||
#define C_LEAFPROC 108 /* Leaf procedure, "call" via BAL */
|
||||
|
||||
#define C_SCALL 107 /* Procedure reachable via system call */
|
||||
#define C_LEAFEXT 108 /* External leaf */
|
||||
#define C_LEAFSTAT 113 /* Static leaf */
|
||||
#define C_OPTVAR 109 /* Optimized variable */
|
||||
#define C_DEFINE 110 /* Preprocessor #define */
|
||||
#define C_PRAGMA 111 /* Advice to compiler or linker */
|
||||
#define C_SEGMENT 112 /* 80960 segment name */
|
||||
|
||||
/* Storage classes for m88k */
|
||||
#define C_SHADOW 107 /* shadow symbol */
|
||||
#define C_VERSION 108 /* coff version symbol */
|
||||
|
||||
/* New storage classes for RS/6000 */
|
||||
#define C_HIDEXT 107 /* Un-named external symbol */
|
||||
#define C_BINCL 108 /* Marks beginning of include file */
|
||||
#define C_EINCL 109 /* Marks ending of include file */
|
||||
|
||||
/* storage classes for stab symbols for RS/6000 */
|
||||
#define C_GSYM (0x80)
|
||||
#define C_LSYM (0x81)
|
||||
#define C_PSYM (0x82)
|
||||
#define C_RSYM (0x83)
|
||||
#define C_RPSYM (0x84)
|
||||
#define C_STSYM (0x85)
|
||||
#define C_TCSYM (0x86)
|
||||
#define C_BCOMM (0x87)
|
||||
#define C_ECOML (0x88)
|
||||
#define C_ECOMM (0x89)
|
||||
#define C_DECL (0x8c)
|
||||
#define C_ENTRY (0x8d)
|
||||
#define C_FUN (0x8e)
|
||||
#define C_BSTAT (0x8f)
|
||||
#define C_ESTAT (0x90)
|
||||
|
||||
/* Storage classes for Thumb symbols */
|
||||
#define C_THUMBEXT (128 + C_EXT) /* 130 */
|
||||
#define C_THUMBSTAT (128 + C_STAT) /* 131 */
|
||||
#define C_THUMBLABEL (128 + C_LABEL) /* 134 */
|
||||
#define C_THUMBEXTFUNC (C_THUMBEXT + 20) /* 150 */
|
||||
#define C_THUMBSTATFUNC (C_THUMBSTAT + 20) /* 151 */
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
#define SCNNMLEN (8)
|
||||
|
||||
struct internal_scnhdr
|
||||
{
|
||||
char s_name[SCNNMLEN]; /* section name */
|
||||
|
||||
/* Physical address, aliased s_nlib.
|
||||
In the pei format, this field is the virtual section size
|
||||
(the size of the section after being loaded int memory),
|
||||
NOT the physical address. */
|
||||
bfd_vma s_paddr;
|
||||
|
||||
bfd_vma s_vaddr; /* virtual address */
|
||||
bfd_vma s_size; /* section size */
|
||||
bfd_vma s_scnptr; /* file ptr to raw data for section */
|
||||
bfd_vma s_relptr; /* file ptr to relocation */
|
||||
bfd_vma s_lnnoptr; /* file ptr to line numbers */
|
||||
unsigned long s_nreloc; /* number of relocation entries */
|
||||
unsigned long s_nlnno; /* number of line number entries*/
|
||||
long s_flags; /* flags */
|
||||
long s_align; /* used on I960 */
|
||||
unsigned char s_page; /* TI COFF load page */
|
||||
};
|
||||
|
||||
/* s_flags "type". */
|
||||
#define STYP_REG (0x0000) /* "regular": allocated, relocated, loaded */
|
||||
#define STYP_DSECT (0x0001) /* "dummy": relocated only*/
|
||||
#define STYP_NOLOAD (0x0002) /* "noload": allocated, relocated, not loaded */
|
||||
#define STYP_GROUP (0x0004) /* "grouped": formed of input sections */
|
||||
#define STYP_PAD (0x0008) /* "padding": not allocated, not relocated, loaded */
|
||||
#define STYP_COPY (0x0010) /* "copy": for decision function used by field update; not allocated, not relocated,
|
||||
loaded; reloc & lineno entries processed normally */
|
||||
#define STYP_TEXT (0x0020) /* section contains text only */
|
||||
#define S_SHRSEG (0x0020) /* In 3b Update files (output of ogen), sections which appear in SHARED segments of the Pfile
|
||||
will have the S_SHRSEG flag set by ogen, to inform dufr that updating 1 copy of the proc. will
|
||||
update all process invocations. */
|
||||
#define STYP_DATA (0x0040) /* section contains data only */
|
||||
#define STYP_BSS (0x0080) /* section contains bss only */
|
||||
#define S_NEWFCN (0x0100) /* In a minimal file or an update file, a new function (as compared with a replaced function) */
|
||||
#define STYP_INFO (0x0200) /* comment: not allocated not relocated, not loaded */
|
||||
#define STYP_OVER (0x0400) /* overlay: relocated not allocated or loaded */
|
||||
#define STYP_LIB (0x0800) /* for .lib: same as INFO */
|
||||
#define STYP_MERGE (0x2000) /* merge section -- combines with text, data or bss sections only */
|
||||
#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions
|
||||
wherever padding is necessary and there is a
|
||||
word of contiguous bytes beginning on a word
|
||||
boundary. */
|
||||
|
||||
#define STYP_LIT 0x8020 /* Literal data (like STYP_TEXT) */
|
||||
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
Line numbers are grouped on a per function basis; first entry in a function
|
||||
grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
symbol table index of the function name. */
|
||||
|
||||
struct internal_lineno
|
||||
{
|
||||
union
|
||||
{
|
||||
bfd_signed_vma l_symndx; /* function name symbol index, iff l_lnno == 0*/
|
||||
bfd_signed_vma l_paddr; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
unsigned long l_lnno; /* line number */
|
||||
};
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define FILNMLEN 14 /* # characters in a file name */
|
||||
#define DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct internal_syment
|
||||
{
|
||||
union
|
||||
{
|
||||
char _n_name[SYMNMLEN]; /* old COFF version */
|
||||
struct
|
||||
{
|
||||
long _n_zeroes; /* new == 0 */
|
||||
long _n_offset; /* offset into string table */
|
||||
} _n_n;
|
||||
char *_n_nptr[2]; /* allows for overlaying */
|
||||
} _n;
|
||||
bfd_vma n_value; /* value of symbol */
|
||||
short n_scnum; /* section number */
|
||||
unsigned short n_flags; /* copy of flags from filhdr */
|
||||
unsigned short n_type; /* type and derived type */
|
||||
unsigned char n_sclass; /* storage class */
|
||||
unsigned char n_numaux; /* number of aux. entries */
|
||||
};
|
||||
|
||||
#define n_name _n._n_name
|
||||
#define n_zeroes _n._n_n._n_zeroes
|
||||
#define n_offset _n._n_n._n_offset
|
||||
|
||||
/* Relocatable symbols have number of the section in which they are defined,
|
||||
or one of the following: */
|
||||
|
||||
#define N_UNDEF ((short)0) /* undefined symbol */
|
||||
#define N_ABS ((short)-1) /* value of symbol is absolute */
|
||||
#define N_DEBUG ((short)-2) /* debugging symbol -- value is meaningless */
|
||||
#define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */
|
||||
#define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/
|
||||
|
||||
/* Type of a symbol, in low N bits of the word. */
|
||||
|
||||
#define T_NULL 0
|
||||
#define T_VOID 1 /* function argument (only used by compiler) */
|
||||
#define T_CHAR 2 /* character */
|
||||
#define T_SHORT 3 /* short integer */
|
||||
#define T_INT 4 /* integer */
|
||||
#define T_LONG 5 /* long integer */
|
||||
#define T_FLOAT 6 /* floating point */
|
||||
#define T_DOUBLE 7 /* double word */
|
||||
#define T_STRUCT 8 /* structure */
|
||||
#define T_UNION 9 /* union */
|
||||
#define T_ENUM 10 /* enumeration */
|
||||
#define T_MOE 11 /* member of enumeration*/
|
||||
#define T_UCHAR 12 /* unsigned character */
|
||||
#define T_USHORT 13 /* unsigned short */
|
||||
#define T_UINT 14 /* unsigned integer */
|
||||
#define T_ULONG 15 /* unsigned long */
|
||||
#define T_LNGDBL 16 /* long double */
|
||||
|
||||
/* Derived types, in n_type. */
|
||||
|
||||
#define DT_NON (0) /* no derived type */
|
||||
#define DT_PTR (1) /* pointer */
|
||||
#define DT_FCN (2) /* function */
|
||||
#define DT_ARY (3) /* array */
|
||||
|
||||
#define BTYPE(x) ((x) & N_BTMASK)
|
||||
#define DTYPE(x) (((x) & N_TMASK) >> N_BTSHFT)
|
||||
|
||||
#define ISPTR(x) \
|
||||
(((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_PTR << N_BTSHFT))
|
||||
#define ISFCN(x) \
|
||||
(((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_FCN << N_BTSHFT))
|
||||
#define ISARY(x) \
|
||||
(((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_ARY << N_BTSHFT))
|
||||
#define ISTAG(x) \
|
||||
((x) == C_STRTAG || (x) == C_UNTAG || (x) == C_ENTAG)
|
||||
#define DECREF(x) \
|
||||
((((x) >> N_TSHIFT) & ~ N_BTMASK) | ((x) & N_BTMASK))
|
||||
|
||||
union internal_auxent
|
||||
{
|
||||
struct
|
||||
{
|
||||
|
||||
union
|
||||
{
|
||||
long l; /* str, un, or enum tag indx */
|
||||
struct coff_ptr_struct *p;
|
||||
} x_tagndx;
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
unsigned short x_lnno; /* declaration line number */
|
||||
unsigned short x_size; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
long x_fsize; /* size of function */
|
||||
} x_misc;
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{ /* if ISFCN, tag, or .bb */
|
||||
bfd_signed_vma x_lnnoptr; /* ptr to fcn line # */
|
||||
union
|
||||
{ /* entry ndx past block end */
|
||||
long l;
|
||||
struct coff_ptr_struct *p;
|
||||
} x_endndx;
|
||||
} x_fcn;
|
||||
|
||||
struct
|
||||
{ /* if ISARY, up to 4 dimen. */
|
||||
unsigned short x_dimen[DIMNUM];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
|
||||
unsigned short x_tvndx; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union
|
||||
{
|
||||
char x_fname[FILNMLEN];
|
||||
struct
|
||||
{
|
||||
long x_zeroes;
|
||||
long x_offset;
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct
|
||||
{
|
||||
long x_scnlen; /* section length */
|
||||
unsigned short x_nreloc; /* # relocation entries */
|
||||
unsigned short x_nlinno; /* # line numbers */
|
||||
unsigned long x_checksum; /* section COMDAT checksum for PE */
|
||||
unsigned short x_associated; /* COMDAT associated section index for PE */
|
||||
unsigned char x_comdat; /* COMDAT selection number for PE */
|
||||
} x_scn;
|
||||
|
||||
struct
|
||||
{
|
||||
long x_tvfill; /* tv fill value */
|
||||
unsigned short x_tvlen; /* length of .tv */
|
||||
unsigned short x_tvran[2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
/******************************************
|
||||
* RS/6000-specific auxent - last auxent for every external symbol
|
||||
******************************************/
|
||||
struct
|
||||
{
|
||||
union
|
||||
{ /* csect length or enclosing csect */
|
||||
bfd_signed_vma l;
|
||||
struct coff_ptr_struct *p;
|
||||
} x_scnlen;
|
||||
long x_parmhash; /* parm type hash index */
|
||||
unsigned short x_snhash; /* sect num with parm hash */
|
||||
unsigned char x_smtyp; /* symbol align and type */
|
||||
/* 0-4 - Log 2 of alignment */
|
||||
/* 5-7 - symbol type */
|
||||
unsigned char x_smclas; /* storage mapping class */
|
||||
long x_stab; /* dbx stab info index */
|
||||
unsigned short x_snstab; /* sect num with dbx stab */
|
||||
} x_csect; /* csect definition information */
|
||||
|
||||
/* x_smtyp values: */
|
||||
|
||||
#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */
|
||||
#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */
|
||||
/* Symbol type values: */
|
||||
#define XTY_ER 0 /* External reference */
|
||||
#define XTY_SD 1 /* Csect definition */
|
||||
#define XTY_LD 2 /* Label definition */
|
||||
#define XTY_CM 3 /* .BSS */
|
||||
#define XTY_EM 4 /* Error message */
|
||||
#define XTY_US 5 /* "Reserved for internal use" */
|
||||
|
||||
/* x_smclas values: */
|
||||
|
||||
#define XMC_PR 0 /* Read-only program code */
|
||||
#define XMC_RO 1 /* Read-only constant */
|
||||
#define XMC_DB 2 /* Read-only debug dictionary table */
|
||||
#define XMC_TC 3 /* Read-write general TOC entry */
|
||||
#define XMC_UA 4 /* Read-write unclassified */
|
||||
#define XMC_RW 5 /* Read-write data */
|
||||
#define XMC_GL 6 /* Read-only global linkage */
|
||||
#define XMC_XO 7 /* Read-only extended operation */
|
||||
#define XMC_SV 8 /* Read-only supervisor call */
|
||||
#define XMC_BS 9 /* Read-write BSS */
|
||||
#define XMC_DS 10 /* Read-write descriptor csect */
|
||||
#define XMC_UC 11 /* Read-write unnamed Fortran common */
|
||||
#define XMC_TI 12 /* Read-only traceback index csect */
|
||||
#define XMC_TB 13 /* Read-only traceback table csect */
|
||||
/* 14 ??? */
|
||||
#define XMC_TC0 15 /* Read-write TOC anchor */
|
||||
#define XMC_TD 16 /* Read-write data in TOC */
|
||||
|
||||
/******************************************
|
||||
* I960-specific *2nd* aux. entry formats
|
||||
******************************************/
|
||||
struct
|
||||
{
|
||||
/* This is a very old typo that keeps getting propagated. */
|
||||
#define x_stdindx x_stindx
|
||||
long x_stindx; /* sys. table entry */
|
||||
} x_sc; /* system call entry */
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned long x_balntry; /* BAL entry point */
|
||||
} x_bal; /* BAL-callable function */
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned long x_timestamp; /* time stamp */
|
||||
char x_idstring[20]; /* producer identity string */
|
||||
} x_ident; /* Producer ident info */
|
||||
|
||||
};
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct internal_reloc
|
||||
{
|
||||
bfd_vma r_vaddr; /* Virtual address of reference */
|
||||
long r_symndx; /* Index into symbol table */
|
||||
unsigned short r_type; /* Relocation type */
|
||||
unsigned char r_size; /* Used by RS/6000 and ECOFF */
|
||||
unsigned char r_extern; /* Used by ECOFF */
|
||||
unsigned long r_offset; /* Used by Alpha ECOFF, SPARC, others */
|
||||
};
|
||||
|
||||
#define R_DIR16 1
|
||||
#define R_REL24 5
|
||||
#define R_DIR32 6
|
||||
#define R_IMAGEBASE 7
|
||||
#define R_SECREL32 11
|
||||
#define R_RELBYTE 15
|
||||
#define R_RELWORD 16
|
||||
#define R_RELLONG 17
|
||||
#define R_PCRBYTE 18
|
||||
#define R_PCRWORD 19
|
||||
#define R_PCRLONG 20
|
||||
#define R_PCR24 21
|
||||
#define R_IPRSHORT 24
|
||||
#define R_IPRLONG 26
|
||||
#define R_GETSEG 29
|
||||
#define R_GETPA 30
|
||||
#define R_TAGWORD 31
|
||||
#define R_JUMPTARG 32 /* strange 29k 00xx00xx reloc */
|
||||
#define R_PARTLS16 32
|
||||
#define R_PARTMS8 33
|
||||
|
||||
#define R_PCR16L 128
|
||||
#define R_PCR26L 129
|
||||
#define R_VRT16 130
|
||||
#define R_HVRT16 131
|
||||
#define R_LVRT16 132
|
||||
#define R_VRT32 133
|
||||
|
||||
|
||||
/* This reloc identifies mov.b instructions with a 16bit absolute
|
||||
address. The linker tries to turn insns with this reloc into
|
||||
an absolute 8-bit address. */
|
||||
#define R_MOV16B1 0x41
|
||||
|
||||
/* This reloc identifies mov.b instructions which had a 16bit
|
||||
absolute address which have been shortened into a 8-bit
|
||||
absolute address. */
|
||||
#define R_MOV16B2 0x42
|
||||
|
||||
/* This reloc identifies jmp insns with a 16bit target address;
|
||||
the linker tries to turn these insns into bra insns with
|
||||
an 8bit pc-relative target. */
|
||||
#define R_JMP1 0x43
|
||||
|
||||
/* This reloc identifies a bra with an 8-bit pc-relative
|
||||
target that was formerly a jmp insn with a 16bit target. */
|
||||
#define R_JMP2 0x44
|
||||
|
||||
/* ??? */
|
||||
#define R_RELLONG_NEG 0x45
|
||||
|
||||
/* This reloc identifies jmp insns with a 24bit target address;
|
||||
the linker tries to turn these insns into bra insns with
|
||||
an 8bit pc-relative target. */
|
||||
#define R_JMPL1 0x46
|
||||
|
||||
/* This reloc identifies a bra with an 8-bit pc-relative
|
||||
target that was formerly a jmp insn with a 24bit target. */
|
||||
#define R_JMPL2 0x47
|
||||
|
||||
/* This reloc identifies mov.b instructions with a 24bit absolute
|
||||
address. The linker tries to turn insns with this reloc into
|
||||
an absolute 8-bit address. */
|
||||
|
||||
#define R_MOV24B1 0x48
|
||||
|
||||
/* This reloc identifies mov.b instructions which had a 24bit
|
||||
absolute address which have been shortened into a 8-bit
|
||||
absolute address. */
|
||||
#define R_MOV24B2 0x49
|
||||
|
||||
/* An h8300 memory indirect jump/call. Forces the address of the jump/call
|
||||
target into the function vector (in page zero), and the address of the
|
||||
vector entry to be placed in the jump/call instruction. */
|
||||
#define R_MEM_INDIRECT 0x4a
|
||||
|
||||
/* This reloc identifies a 16bit pc-relative branch target which was
|
||||
shortened into an 8bit pc-relative branch target. */
|
||||
#define R_PCRWORD_B 0x4b
|
||||
|
||||
/* This reloc identifies mov.[wl] instructions with a 32/24 bit
|
||||
absolute address; the linker may turn this into a mov.[wl]
|
||||
insn with a 16bit absolute address. */
|
||||
#define R_MOVL1 0x4c
|
||||
|
||||
/* This reloc identifies mov.[wl] insns which formerly had
|
||||
a 32/24bit absolute address and now have a 16bit absolute address. */
|
||||
#define R_MOVL2 0x4d
|
||||
|
||||
/* This reloc identifies a bCC:8 which will have it's condition
|
||||
inverted and its target redirected to the target of the branch
|
||||
in the following insn. */
|
||||
#define R_BCC_INV 0x4e
|
||||
|
||||
/* This reloc identifies a jmp instruction that has been deleted. */
|
||||
#define R_JMP_DEL 0x4f
|
||||
|
||||
/* Z8k modes */
|
||||
#define R_IMM16 0x01 /* 16 bit abs */
|
||||
#define R_JR 0x02 /* jr 8 bit disp */
|
||||
#define R_IMM4L 0x23 /* low nibble */
|
||||
#define R_IMM8 0x22 /* 8 bit abs */
|
||||
#define R_IMM32 R_RELLONG /* 32 bit abs */
|
||||
#define R_CALL R_DA /* Absolute address which could be a callr */
|
||||
#define R_JP R_DA /* Absolute address which could be a jp */
|
||||
#define R_REL16 0x04 /* 16 bit PC rel */
|
||||
#define R_CALLR 0x05 /* callr 12 bit disp */
|
||||
#define R_SEG 0x10 /* set if in segmented mode */
|
||||
#define R_IMM4H 0x24 /* high nibble */
|
||||
#define R_DISP7 0x25 /* djnz displacement */
|
||||
|
||||
/* Z80 modes */
|
||||
#define R_OFF8 0x32 /* 8 bit signed abs, for (i[xy]+d) */
|
||||
#define R_IMM24 0x33 /* 24 bit abs */
|
||||
/* R_JR, R_IMM8, R_IMM16, R_IMM32 - as for Z8k */
|
||||
|
||||
/* H8500 modes */
|
||||
|
||||
#define R_H8500_IMM8 1 /* 8 bit immediate */
|
||||
#define R_H8500_IMM16 2 /* 16 bit immediate */
|
||||
#define R_H8500_PCREL8 3 /* 8 bit pcrel */
|
||||
#define R_H8500_PCREL16 4 /* 16 bit pcrel */
|
||||
#define R_H8500_HIGH8 5 /* high 8 bits of 24 bit address */
|
||||
#define R_H8500_LOW16 7 /* low 16 bits of 24 bit immediate */
|
||||
#define R_H8500_IMM24 6 /* 24 bit immediate */
|
||||
#define R_H8500_IMM32 8 /* 32 bit immediate */
|
||||
#define R_H8500_HIGH16 9 /* high 16 bits of 32 bit immediate */
|
||||
|
||||
/* W65 modes */
|
||||
|
||||
#define R_W65_ABS8 1 /* addr & 0xff */
|
||||
#define R_W65_ABS16 2 /* addr & 0xffff */
|
||||
#define R_W65_ABS24 3 /* addr & 0xffffff */
|
||||
|
||||
#define R_W65_ABS8S8 4 /* (addr >> 8) & 0xff */
|
||||
#define R_W65_ABS8S16 5 /* (addr >> 16) & 0xff */
|
||||
|
||||
#define R_W65_ABS16S8 6 /* (addr >> 8) & 0ffff */
|
||||
#define R_W65_ABS16S16 7 /* (addr >> 16) & 0ffff */
|
||||
|
||||
#define R_W65_PCR8 8
|
||||
#define R_W65_PCR16 9
|
||||
|
||||
#define R_W65_DP 10 /* direct page 8 bits only */
|
||||
|
||||
#endif /* GNU_COFF_INTERNAL_H */
|
||||
@@ -1,81 +0,0 @@
|
||||
/* coff information for M68K
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef GNU_COFF_M68K_H
|
||||
#define GNU_COFF_M68K_H 1
|
||||
|
||||
#define L_LNNO_SIZE 2
|
||||
#include "coff/external.h"
|
||||
|
||||
/* Motorola 68000/68008/68010/68020 */
|
||||
#define MC68MAGIC 0520
|
||||
#define MC68KWRMAGIC 0520 /* writeable text segments */
|
||||
#define MC68TVMAGIC 0521
|
||||
#define MC68KROMAGIC 0521 /* readonly shareable text segments */
|
||||
#define MC68KPGMAGIC 0522 /* demand paged text segments */
|
||||
#define M68MAGIC 0210
|
||||
#define M68TVMAGIC 0211
|
||||
|
||||
/* This is the magic of the Bull dpx/2 */
|
||||
#define MC68KBCSMAGIC 0526
|
||||
|
||||
/* This is Lynx's all-platform magic number for executables. */
|
||||
|
||||
#define LYNXCOFFMAGIC 0415
|
||||
|
||||
#define OMAGIC M68MAGIC
|
||||
|
||||
/* This intentionally does not include MC68KBCSMAGIC; it only includes
|
||||
magic numbers which imply that names do not have underscores. */
|
||||
#define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \
|
||||
&& ((x).f_magic != MC68KWRMAGIC) \
|
||||
&& ((x).f_magic != MC68TVMAGIC) \
|
||||
&& ((x).f_magic != MC68KROMAGIC) \
|
||||
&& ((x).f_magic != MC68KPGMAGIC) \
|
||||
&& ((x).f_magic != M68MAGIC) \
|
||||
&& ((x).f_magic != M68TVMAGIC) \
|
||||
&& ((x).f_magic != LYNXCOFFMAGIC))
|
||||
|
||||
/* Magic numbers for the a.out header. */
|
||||
|
||||
#define PAGEMAGICEXECSWAPPED 0407 /* executable (swapped) */
|
||||
#define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */
|
||||
#define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */
|
||||
#define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
#ifdef M68K_COFF_OFFSET
|
||||
char r_offset[4];
|
||||
#endif
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
|
||||
#ifdef M68K_COFF_OFFSET
|
||||
#define RELSZ 14
|
||||
#else
|
||||
#define RELSZ 10
|
||||
#endif
|
||||
|
||||
#endif /* GNU_COFF_M68K_H */
|
||||
@@ -1,196 +0,0 @@
|
||||
/* coff information for 88k bcs
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define DO_NOT_DEFINE_SCNHDR
|
||||
#define L_LNNO_SIZE 4
|
||||
#define DO_NOT_DEFINE_SYMENT
|
||||
#define DO_NOT_DEFINE_AUXENT
|
||||
#include "coff/external.h"
|
||||
|
||||
#define MC88MAGIC 0540 /* 88k BCS executable */
|
||||
#define MC88DMAGIC 0541 /* DG/UX executable */
|
||||
#define MC88OMAGIC 0555 /* Object file */
|
||||
|
||||
#define MC88BADMAG(x) (((x).f_magic != MC88MAGIC) \
|
||||
&& ((x).f_magic != MC88DMAGIC) \
|
||||
&& ((x).f_magic != MC88OMAGIC))
|
||||
|
||||
#define PAGEMAGIC3 0414 /* Split i&d, zero mapped */
|
||||
#define PAGEMAGICBCS 0413
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
struct external_scnhdr
|
||||
{
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[4]; /* number of relocation entries */
|
||||
char s_nlnno[4]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 44
|
||||
|
||||
/* Names of "special" sections. */
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _COMMENT ".comment"
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union
|
||||
{
|
||||
char e_name[E_SYMNMLEN];
|
||||
|
||||
struct
|
||||
{
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
|
||||
} e;
|
||||
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
char pad2[2];
|
||||
};
|
||||
|
||||
#define N_BTMASK 017
|
||||
#define N_TMASK 060
|
||||
#define N_BTSHFT 4
|
||||
#define N_TSHIFT 2
|
||||
|
||||
/* Note that this isn't the same shape as other coffs */
|
||||
union external_auxent
|
||||
{
|
||||
struct
|
||||
{
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
/* 4 */
|
||||
|
||||
union
|
||||
{
|
||||
char x_fsize[4]; /* size of function */
|
||||
|
||||
struct
|
||||
{
|
||||
char x_lnno[4]; /* declaration line number */
|
||||
char x_size[4]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
|
||||
} x_misc;
|
||||
|
||||
/* 12 */
|
||||
union
|
||||
{
|
||||
struct /* if ISFCN, tag, or .bb */
|
||||
{
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
|
||||
struct /* if ISARY, up to 4 dimen. */
|
||||
{
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
|
||||
} x_fcnary;
|
||||
/* 20 */
|
||||
|
||||
} x_sym;
|
||||
|
||||
union
|
||||
{
|
||||
char x_fname[E_FILNMLEN];
|
||||
|
||||
struct
|
||||
{
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
|
||||
} x_file;
|
||||
|
||||
struct
|
||||
{
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[4]; /* # relocation entries */
|
||||
char x_nlinno[4]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct
|
||||
{
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
};
|
||||
|
||||
#define GET_LNSZ_SIZE(abfd, ext) \
|
||||
H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_size)
|
||||
#define GET_LNSZ_LNNO(abfd, ext) \
|
||||
H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno)
|
||||
#define PUT_LNSZ_LNNO(abfd, in, ext) \
|
||||
H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_lnno)
|
||||
#define PUT_LNSZ_SIZE(abfd, in, ext) \
|
||||
H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_size)
|
||||
#define GET_SCN_NRELOC(abfd, ext) \
|
||||
H_GET_32 (abfd, ext->x_scn.x_nreloc)
|
||||
#define GET_SCN_NLINNO(abfd, ext) \
|
||||
H_GET_32 (abfd, ext->x_scn.x_nlinno)
|
||||
#define PUT_SCN_NRELOC(abfd, in, ext) \
|
||||
H_PUT_32 (abfd, in, ext->x_scn.x_nreloc)
|
||||
#define PUT_SCN_NLINNO(abfd, in, ext) \
|
||||
H_PUT_32 (abfd,in, ext->x_scn.x_nlinno)
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 20
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 20
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
char r_offset[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 12
|
||||
|
||||
#define NO_TVNDX
|
||||
@@ -1,56 +0,0 @@
|
||||
/* COFF spec for MAXQ
|
||||
|
||||
Copyright 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
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.,
|
||||
51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Contributed by Vineet Sharma(vineets@noida.hcltech.com) Inderpreet
|
||||
S.(inderpreetb@noida.hcltech.com) HCL Technologies Ltd. */
|
||||
|
||||
#define L_LNNO_SIZE 2
|
||||
|
||||
#include "coff/external.h"
|
||||
|
||||
/* Bits for f_flags: F_RELFLG relocation info stripped from file F_EXEC file
|
||||
is executable (no unresolved external references) F_LNNO line numbers
|
||||
stripped from file F_LSYMS local symbols stripped from file. */
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
|
||||
/* Variant Specific Flags for MAXQ10 and MAXQ20. */
|
||||
#define F_MAXQ10 (0x0030)
|
||||
#define F_MAXQ20 (0x0040)
|
||||
|
||||
#define F_MACHMASK (0x00F0)
|
||||
|
||||
/* Magic numbers for maxq. */
|
||||
#define MAXQ20MAGIC 0xa0
|
||||
#define MAXQ20BADMAG(x) (((x).f_magic != MAXQ20MAGIC))
|
||||
#define BADMAG(x) MAXQ20BADMAG (x)
|
||||
|
||||
/* Relocation information declaration and related definitions. */
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4]; /* (Virtual) address of reference. */
|
||||
char r_symndx[4]; /* Index into symbol table. */
|
||||
char r_type[2]; /* Relocation type. */
|
||||
char r_offset[2]; /* Addend. */
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ (10 + 2) /* sizeof (RELOC) */
|
||||
@@ -1,71 +0,0 @@
|
||||
/* Motorola MCore support for BFD.
|
||||
Copyright 1999, 2000 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* This file holds definitions specific to the MCore COFF/PE ABI. */
|
||||
|
||||
#ifndef _COFF_MORE_H
|
||||
#define _COFF_MORE_H
|
||||
|
||||
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
|
||||
#define L_LNNO_SIZE 2
|
||||
#include "coff/external.h"
|
||||
|
||||
#define MCOREMAGIC 0xb00 /* I just made this up */
|
||||
|
||||
#define MCOREBADMAG(x) (((x).f_magic != MCOREMAGIC))
|
||||
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
#define IMAGE_REL_MCORE_ABSOLUTE 0x0000
|
||||
#define IMAGE_REL_MCORE_ADDR32 0x0001
|
||||
#define IMAGE_REL_MCORE_PCREL_IMM8BY4 0x0002
|
||||
#define IMAGE_REL_MCORE_PCREL_IMM11BY2 0x0003
|
||||
#define IMAGE_REL_MCORE_PCREL_IMM4BY2 0x0004
|
||||
#define IMAGE_REL_MCORE_PCREL_32 0x0005
|
||||
#define IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2 0x0006
|
||||
#define IMAGE_REL_MCORE_RVA 0x0007
|
||||
|
||||
#define PEMCORE
|
||||
|
||||
#define OMAGIC 0404 /* object files, eg as output */
|
||||
#define ZMAGIC 0413 /* demand load format, eg normal ld output */
|
||||
#define STMAGIC 0401 /* target shlib */
|
||||
#define SHMAGIC 0443 /* host shlib */
|
||||
|
||||
/* From winnt.h */
|
||||
#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
|
||||
|
||||
/* Define some NT default values. */
|
||||
#define NT_SECTION_ALIGNMENT 0x1000
|
||||
#define NT_FILE_ALIGNMENT 0x200
|
||||
#define NT_DEF_RESERVE 0x100000
|
||||
#define NT_DEF_COMMIT 0x1000
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr [4];
|
||||
char r_symndx [4];
|
||||
char r_type [2];
|
||||
char r_offset [4];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 14
|
||||
|
||||
#endif /* __COFF_MCORE_H */
|
||||
@@ -1,343 +0,0 @@
|
||||
/* ECOFF support on MIPS machines.
|
||||
coff/ecoff.h must be included before this file.
|
||||
|
||||
Copyright 1999, 2004 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define DO_NOT_DEFINE_AOUTHDR
|
||||
#define L_LNNO_SIZE 4
|
||||
#include "coff/external.h"
|
||||
|
||||
/* Magic numbers are defined in coff/ecoff.h. */
|
||||
#define MIPS_ECOFF_BADMAG(x) (((x).f_magic!=MIPS_MAGIC_1) && \
|
||||
((x).f_magic!=MIPS_MAGIC_LITTLE) &&\
|
||||
((x).f_magic!=MIPS_MAGIC_BIG) && \
|
||||
((x).f_magic!=MIPS_MAGIC_LITTLE2) && \
|
||||
((x).f_magic!=MIPS_MAGIC_BIG2) && \
|
||||
((x).f_magic!=MIPS_MAGIC_LITTLE3) && \
|
||||
((x).f_magic!=MIPS_MAGIC_BIG3))
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
typedef struct external_aouthdr
|
||||
{
|
||||
unsigned char magic[2]; /* type of file */
|
||||
unsigned char vstamp[2]; /* version stamp */
|
||||
unsigned char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
unsigned char dsize[4]; /* initialized data " " */
|
||||
unsigned char bsize[4]; /* uninitialized data " " */
|
||||
unsigned char entry[4]; /* entry pt. */
|
||||
unsigned char text_start[4]; /* base of text used for this file */
|
||||
unsigned char data_start[4]; /* base of data used for this file */
|
||||
unsigned char bss_start[4]; /* base of bss used for this file */
|
||||
unsigned char gprmask[4]; /* ?? */
|
||||
unsigned char cprmask[4][4]; /* ?? */
|
||||
unsigned char gp_value[4]; /* value for gp register */
|
||||
} AOUTHDR;
|
||||
|
||||
/* compute size of a header */
|
||||
|
||||
#define AOUTSZ 56
|
||||
#define AOUTHDRSZ 56
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
unsigned char r_vaddr[4];
|
||||
unsigned char r_bits[4];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 8
|
||||
|
||||
/* MIPS ECOFF uses a packed 8 byte format for relocs. These constants
|
||||
are used to unpack the r_bits field. */
|
||||
|
||||
#define RELOC_BITS0_SYMNDX_SH_LEFT_BIG 16
|
||||
#define RELOC_BITS0_SYMNDX_SH_LEFT_LITTLE 0
|
||||
|
||||
#define RELOC_BITS1_SYMNDX_SH_LEFT_BIG 8
|
||||
#define RELOC_BITS1_SYMNDX_SH_LEFT_LITTLE 8
|
||||
|
||||
#define RELOC_BITS2_SYMNDX_SH_LEFT_BIG 0
|
||||
#define RELOC_BITS2_SYMNDX_SH_LEFT_LITTLE 16
|
||||
|
||||
/* Originally, ECOFF used four bits for the reloc type and had three
|
||||
reserved bits. Irix 4 added another bit for the reloc type, which
|
||||
was easy because it was big endian and one of the spare bits became
|
||||
the new most significant bit. To make this also work for little
|
||||
endian ECOFF, we need to wrap one of the reserved bits around to
|
||||
become the most significant bit of the reloc type. */
|
||||
#define RELOC_BITS3_TYPE_BIG 0x3E
|
||||
#define RELOC_BITS3_TYPE_SH_BIG 1
|
||||
#define RELOC_BITS3_TYPE_LITTLE 0x78
|
||||
#define RELOC_BITS3_TYPE_SH_LITTLE 3
|
||||
#define RELOC_BITS3_TYPEHI_LITTLE 0x04
|
||||
#define RELOC_BITS3_TYPEHI_SH_LITTLE 2
|
||||
|
||||
#define RELOC_BITS3_EXTERN_BIG 0x01
|
||||
#define RELOC_BITS3_EXTERN_LITTLE 0x80
|
||||
|
||||
/* The r_type field in a reloc is one of the following values. I
|
||||
don't know if any other values can appear. These seem to be all
|
||||
that occur in the Ultrix 4.2 libraries. */
|
||||
#define MIPS_R_IGNORE 0
|
||||
#define MIPS_R_REFHALF 1
|
||||
#define MIPS_R_REFWORD 2
|
||||
#define MIPS_R_JMPADDR 3
|
||||
#define MIPS_R_REFHI 4
|
||||
#define MIPS_R_REFLO 5
|
||||
#define MIPS_R_GPREL 6
|
||||
#define MIPS_R_LITERAL 7
|
||||
|
||||
/* FIXME: This relocation is used (internally only) to represent branches
|
||||
when assembling. It should never appear in output files, and
|
||||
be removed. (It used to be used for embedded-PIC support.) */
|
||||
#define MIPS_R_PCREL16 12
|
||||
|
||||
/********************** STABS **********************/
|
||||
|
||||
#define MIPS_IS_STAB ECOFF_IS_STAB
|
||||
#define MIPS_MARK_STAB ECOFF_MARK_STAB
|
||||
#define MIPS_UNMARK_STAB ECOFF_UNMARK_STAB
|
||||
|
||||
/********************** SYMBOLIC INFORMATION **********************/
|
||||
|
||||
/* Written by John Gilmore. */
|
||||
|
||||
/* ECOFF uses COFF-like section structures, but its own symbol format.
|
||||
This file defines the symbol format in fields whose size and alignment
|
||||
will not vary on different host systems. */
|
||||
|
||||
/* File header as a set of bytes */
|
||||
|
||||
struct hdr_ext
|
||||
{
|
||||
unsigned char h_magic[2];
|
||||
unsigned char h_vstamp[2];
|
||||
unsigned char h_ilineMax[4];
|
||||
unsigned char h_cbLine[4];
|
||||
unsigned char h_cbLineOffset[4];
|
||||
unsigned char h_idnMax[4];
|
||||
unsigned char h_cbDnOffset[4];
|
||||
unsigned char h_ipdMax[4];
|
||||
unsigned char h_cbPdOffset[4];
|
||||
unsigned char h_isymMax[4];
|
||||
unsigned char h_cbSymOffset[4];
|
||||
unsigned char h_ioptMax[4];
|
||||
unsigned char h_cbOptOffset[4];
|
||||
unsigned char h_iauxMax[4];
|
||||
unsigned char h_cbAuxOffset[4];
|
||||
unsigned char h_issMax[4];
|
||||
unsigned char h_cbSsOffset[4];
|
||||
unsigned char h_issExtMax[4];
|
||||
unsigned char h_cbSsExtOffset[4];
|
||||
unsigned char h_ifdMax[4];
|
||||
unsigned char h_cbFdOffset[4];
|
||||
unsigned char h_crfd[4];
|
||||
unsigned char h_cbRfdOffset[4];
|
||||
unsigned char h_iextMax[4];
|
||||
unsigned char h_cbExtOffset[4];
|
||||
};
|
||||
|
||||
/* File descriptor external record */
|
||||
|
||||
struct fdr_ext
|
||||
{
|
||||
unsigned char f_adr[4];
|
||||
unsigned char f_rss[4];
|
||||
unsigned char f_issBase[4];
|
||||
unsigned char f_cbSs[4];
|
||||
unsigned char f_isymBase[4];
|
||||
unsigned char f_csym[4];
|
||||
unsigned char f_ilineBase[4];
|
||||
unsigned char f_cline[4];
|
||||
unsigned char f_ioptBase[4];
|
||||
unsigned char f_copt[4];
|
||||
unsigned char f_ipdFirst[2];
|
||||
unsigned char f_cpd[2];
|
||||
unsigned char f_iauxBase[4];
|
||||
unsigned char f_caux[4];
|
||||
unsigned char f_rfdBase[4];
|
||||
unsigned char f_crfd[4];
|
||||
unsigned char f_bits1[1];
|
||||
unsigned char f_bits2[3];
|
||||
unsigned char f_cbLineOffset[4];
|
||||
unsigned char f_cbLine[4];
|
||||
};
|
||||
|
||||
#define FDR_BITS1_LANG_BIG 0xF8
|
||||
#define FDR_BITS1_LANG_SH_BIG 3
|
||||
#define FDR_BITS1_LANG_LITTLE 0x1F
|
||||
#define FDR_BITS1_LANG_SH_LITTLE 0
|
||||
|
||||
#define FDR_BITS1_FMERGE_BIG 0x04
|
||||
#define FDR_BITS1_FMERGE_LITTLE 0x20
|
||||
|
||||
#define FDR_BITS1_FREADIN_BIG 0x02
|
||||
#define FDR_BITS1_FREADIN_LITTLE 0x40
|
||||
|
||||
#define FDR_BITS1_FBIGENDIAN_BIG 0x01
|
||||
#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80
|
||||
|
||||
#define FDR_BITS2_GLEVEL_BIG 0xC0
|
||||
#define FDR_BITS2_GLEVEL_SH_BIG 6
|
||||
#define FDR_BITS2_GLEVEL_LITTLE 0x03
|
||||
#define FDR_BITS2_GLEVEL_SH_LITTLE 0
|
||||
|
||||
/* We ignore the `reserved' field in bits2. */
|
||||
|
||||
/* Procedure descriptor external record */
|
||||
|
||||
struct pdr_ext
|
||||
{
|
||||
unsigned char p_adr[4];
|
||||
unsigned char p_isym[4];
|
||||
unsigned char p_iline[4];
|
||||
unsigned char p_regmask[4];
|
||||
unsigned char p_regoffset[4];
|
||||
unsigned char p_iopt[4];
|
||||
unsigned char p_fregmask[4];
|
||||
unsigned char p_fregoffset[4];
|
||||
unsigned char p_frameoffset[4];
|
||||
unsigned char p_framereg[2];
|
||||
unsigned char p_pcreg[2];
|
||||
unsigned char p_lnLow[4];
|
||||
unsigned char p_lnHigh[4];
|
||||
unsigned char p_cbLineOffset[4];
|
||||
};
|
||||
|
||||
/* Runtime procedure table */
|
||||
|
||||
struct rpdr_ext
|
||||
{
|
||||
unsigned char p_adr[4];
|
||||
unsigned char p_regmask[4];
|
||||
unsigned char p_regoffset[4];
|
||||
unsigned char p_fregmask[4];
|
||||
unsigned char p_fregoffset[4];
|
||||
unsigned char p_frameoffset[4];
|
||||
unsigned char p_framereg[2];
|
||||
unsigned char p_pcreg[2];
|
||||
unsigned char p_irpss[4];
|
||||
unsigned char p_reserved[4];
|
||||
unsigned char p_exception_info[4];
|
||||
};
|
||||
|
||||
/* Line numbers */
|
||||
|
||||
struct line_ext
|
||||
{
|
||||
unsigned char l_line[4];
|
||||
};
|
||||
|
||||
/* Symbol external record */
|
||||
|
||||
struct sym_ext
|
||||
{
|
||||
unsigned char s_iss[4];
|
||||
unsigned char s_value[4];
|
||||
unsigned char s_bits1[1];
|
||||
unsigned char s_bits2[1];
|
||||
unsigned char s_bits3[1];
|
||||
unsigned char s_bits4[1];
|
||||
};
|
||||
|
||||
#define SYM_BITS1_ST_BIG 0xFC
|
||||
#define SYM_BITS1_ST_SH_BIG 2
|
||||
#define SYM_BITS1_ST_LITTLE 0x3F
|
||||
#define SYM_BITS1_ST_SH_LITTLE 0
|
||||
|
||||
#define SYM_BITS1_SC_BIG 0x03
|
||||
#define SYM_BITS1_SC_SH_LEFT_BIG 3
|
||||
#define SYM_BITS1_SC_LITTLE 0xC0
|
||||
#define SYM_BITS1_SC_SH_LITTLE 6
|
||||
|
||||
#define SYM_BITS2_SC_BIG 0xE0
|
||||
#define SYM_BITS2_SC_SH_BIG 5
|
||||
#define SYM_BITS2_SC_LITTLE 0x07
|
||||
#define SYM_BITS2_SC_SH_LEFT_LITTLE 2
|
||||
|
||||
#define SYM_BITS2_RESERVED_BIG 0x10
|
||||
#define SYM_BITS2_RESERVED_LITTLE 0x08
|
||||
|
||||
#define SYM_BITS2_INDEX_BIG 0x0F
|
||||
#define SYM_BITS2_INDEX_SH_LEFT_BIG 16
|
||||
#define SYM_BITS2_INDEX_LITTLE 0xF0
|
||||
#define SYM_BITS2_INDEX_SH_LITTLE 4
|
||||
|
||||
#define SYM_BITS3_INDEX_SH_LEFT_BIG 8
|
||||
#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4
|
||||
|
||||
#define SYM_BITS4_INDEX_SH_LEFT_BIG 0
|
||||
#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12
|
||||
|
||||
/* External symbol external record */
|
||||
|
||||
struct ext_ext
|
||||
{
|
||||
unsigned char es_bits1[1];
|
||||
unsigned char es_bits2[1];
|
||||
unsigned char es_ifd[2];
|
||||
struct sym_ext es_asym;
|
||||
};
|
||||
|
||||
#define EXT_BITS1_JMPTBL_BIG 0x80
|
||||
#define EXT_BITS1_JMPTBL_LITTLE 0x01
|
||||
|
||||
#define EXT_BITS1_COBOL_MAIN_BIG 0x40
|
||||
#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02
|
||||
|
||||
#define EXT_BITS1_WEAKEXT_BIG 0x20
|
||||
#define EXT_BITS1_WEAKEXT_LITTLE 0x04
|
||||
|
||||
/* Dense numbers external record */
|
||||
|
||||
struct dnr_ext
|
||||
{
|
||||
unsigned char d_rfd[4];
|
||||
unsigned char d_index[4];
|
||||
};
|
||||
|
||||
/* Relative file descriptor */
|
||||
|
||||
struct rfd_ext
|
||||
{
|
||||
unsigned char rfd[4];
|
||||
};
|
||||
|
||||
/* Optimizer symbol external record */
|
||||
|
||||
struct opt_ext
|
||||
{
|
||||
unsigned char o_bits1[1];
|
||||
unsigned char o_bits2[1];
|
||||
unsigned char o_bits3[1];
|
||||
unsigned char o_bits4[1];
|
||||
struct rndx_ext o_rndx;
|
||||
unsigned char o_offset[4];
|
||||
};
|
||||
|
||||
#define OPT_BITS2_VALUE_SH_LEFT_BIG 16
|
||||
#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0
|
||||
|
||||
#define OPT_BITS3_VALUE_SH_LEFT_BIG 8
|
||||
#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8
|
||||
|
||||
#define OPT_BITS4_VALUE_SH_LEFT_BIG 0
|
||||
#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16
|
||||
@@ -1,66 +0,0 @@
|
||||
/* coff information for Windows CE with MIPS VR4111
|
||||
|
||||
Copyright 2000 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define L_LNNO_SIZE 2
|
||||
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
|
||||
#include "coff/external.h"
|
||||
|
||||
#define MIPS_ARCH_MAGIC_WINCE 0x0166 /* Windows CE - little endian */
|
||||
#define MIPS_PE_MAGIC 0x010b
|
||||
|
||||
#define MIPSBADMAG(x) ((x).f_magic != MIPS_ARCH_MAGIC_WINCE)
|
||||
|
||||
/* define some NT default values */
|
||||
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
|
||||
#define NT_SECTION_ALIGNMENT 0x1000
|
||||
#define NT_FILE_ALIGNMENT 0x200
|
||||
#define NT_DEF_RESERVE 0x100000
|
||||
#define NT_DEF_COMMIT 0x1000
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the h8 don't have room in the instruction for the entire
|
||||
offset - eg the strange jump and high page addressing modes. */
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
/* MIPS PE relocation types. */
|
||||
|
||||
#define MIPS_R_ABSOLUTE 0 /* ignored */
|
||||
#define MIPS_R_REFHALF 1
|
||||
#define MIPS_R_REFWORD 2
|
||||
#define MIPS_R_JMPADDR 3
|
||||
#define MIPS_R_REFHI 4 /* PAIR follows */
|
||||
#define MIPS_R_REFLO 5
|
||||
#define MIPS_R_GPREL 6
|
||||
#define MIPS_R_LITERAL 7 /* same as GPREL */
|
||||
#define MIPS_R_SECTION 10
|
||||
#define MIPS_R_SECREL 11
|
||||
#define MIPS_R_SECRELLO 12
|
||||
#define MIPS_R_SECRELHI 13 /* PAIR follows */
|
||||
#define MIPS_R_RVA 34 /* 0x22 */
|
||||
#define MIPS_R_PAIR 37 /* 0x25 - symndx is really a signed 16-bit addend */
|
||||
@@ -1,287 +0,0 @@
|
||||
/* COFF specification for OpenRISC 1000.
|
||||
Copyright (C) 1993-2000, 2002 Free Software Foundation, Inc.
|
||||
Contributed by David Wood @ New York University.
|
||||
Modified by Johan Rydberg, <johan.rydberg@netinsight.se>
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef OR32
|
||||
# define OR32
|
||||
#endif
|
||||
|
||||
/* File Header and related definitions. */
|
||||
struct external_filehdr
|
||||
{
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
/* Magic numbers for OpenRISC 1000. As it is know we use the
|
||||
numbers for Am29000.
|
||||
|
||||
(AT&T will assign the "real" magic number). */
|
||||
#define SIPFBOMAGIC 0572 /* Am29000 (Byte 0 is MSB). */
|
||||
#define SIPRBOMAGIC 0573 /* Am29000 (Byte 0 is LSB). */
|
||||
|
||||
#define OR32_MAGIC_BIG SIPFBOMAGIC
|
||||
#define OR32_MAGIC_LITTLE SIPRBOMAGIC
|
||||
#define OR32BADMAG(x) (((x).f_magic!=OR32_MAGIC_BIG) && \
|
||||
((x).f_magic!=OR32_MAGIC_LITTLE))
|
||||
|
||||
#define OMAGIC OR32_MAGIC_BIG
|
||||
|
||||
/* Optional (a.out) header. */
|
||||
typedef struct external_aouthdr
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry */
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
} AOUTHDR;
|
||||
|
||||
#define AOUTSZ 28
|
||||
#define AOUTHDRSZ 28
|
||||
|
||||
/* aouthdr magic numbers. */
|
||||
#define NMAGIC 0410 /* separate i/d executable. */
|
||||
#define SHMAGIC 0406 /* NYU/Ultra3 shared data executable
|
||||
(writable text). */
|
||||
|
||||
#define _ETEXT "_etext"
|
||||
|
||||
/* Section header and related definitions. */
|
||||
struct external_scnhdr
|
||||
{
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries */
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/* Names of "special" sections: */
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _LIT ".lit"
|
||||
|
||||
/* Section types - with additional section type for global
|
||||
registers which will be relocatable for the OpenRISC 1000.
|
||||
|
||||
In instances where it is necessary for a linker to produce an
|
||||
output file which contains text or data not based at virtual
|
||||
address 0, e.g. for a ROM, then the linker should accept
|
||||
address base information as command input and use PAD sections
|
||||
to skip over unused addresses. */
|
||||
#define STYP_BSSREG 0x1200 /* Global register area (like STYP_INFO) */
|
||||
#define STYP_ENVIR 0x2200 /* Environment (like STYP_INFO) */
|
||||
#define STYP_ABS 0x4000 /* Absolute (allocated, not reloc, loaded) */
|
||||
|
||||
/* Relocation information declaration and related definitions: */
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4]; /* (virtual) address of reference */
|
||||
char r_symndx[4]; /* index into symbol table */
|
||||
char r_type[2]; /* relocation type */
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10 /* sizeof (RELOC) */
|
||||
|
||||
/* Relocation types for the OpenRISC 1000: */
|
||||
|
||||
#define R_ABS 0 /* reference is absolute */
|
||||
#define R_IREL 030 /* instruction relative (jmp/call) */
|
||||
#define R_IABS 031 /* instruction absolute (jmp/call) */
|
||||
#define R_ILOHALF 032 /* instruction low half (const) */
|
||||
#define R_IHIHALF 033 /* instruction high half (consth) part 1 */
|
||||
#define R_IHCONST 034 /* instruction high half (consth) part 2 */
|
||||
/* constant offset of R_IHIHALF relocation */
|
||||
#define R_BYTE 035 /* relocatable byte value */
|
||||
#define R_HWORD 036 /* relocatable halfword value */
|
||||
#define R_WORD 037 /* relocatable word value */
|
||||
|
||||
#define R_IGLBLRC 040 /* instruction global register RC */
|
||||
#define R_IGLBLRA 041 /* instruction global register RA */
|
||||
#define R_IGLBLRB 042 /* instruction global register RB */
|
||||
|
||||
/*
|
||||
NOTE:
|
||||
All the "I" forms refer to 29000 instruction formats. The linker is
|
||||
expected to know how the numeric information is split and/or aligned
|
||||
within the instruction word(s). R_BYTE works for instructions, too.
|
||||
|
||||
If the parameter to a CONSTH instruction is a relocatable type, two
|
||||
relocation records are written. The first has an r_type of R_IHIHALF
|
||||
(33 octal) and a normal r_vaddr and r_symndx. The second relocation
|
||||
record has an r_type of R_IHCONST (34 octal), a normal r_vaddr (which
|
||||
is redundant), and an r_symndx containing the 32-bit constant offset
|
||||
to the relocation instead of the actual symbol table index. This
|
||||
second record is always written, even if the constant offset is zero.
|
||||
The constant fields of the instruction are set to zero. */
|
||||
|
||||
/* Line number entry declaration and related definitions: */
|
||||
struct external_lineno
|
||||
{
|
||||
union
|
||||
{
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
}
|
||||
l_addr;
|
||||
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6 /* sizeof (LINENO) */
|
||||
|
||||
/* Symbol entry declaration and related definitions: */
|
||||
#define E_SYMNMLEN 8 /* Number of characters in a symbol name */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union
|
||||
{
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct
|
||||
{
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
}
|
||||
e;
|
||||
}
|
||||
e;
|
||||
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
|
||||
/* Storage class definitions - new classes for global registers: */
|
||||
#define C_GLBLREG 19 /* global register */
|
||||
#define C_EXTREG 20 /* external global register */
|
||||
#define C_DEFREG 21 /* ext. def. of global register */
|
||||
|
||||
/* Derived symbol mask/shifts: */
|
||||
#define N_BTMASK (0xf)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TMASK (0x30)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
/* Auxiliary symbol table entry declaration and related
|
||||
definitions. */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
union external_auxent
|
||||
{
|
||||
struct
|
||||
{
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
}
|
||||
x_lnsz;
|
||||
|
||||
char x_fsize[4]; /* size of function */
|
||||
}
|
||||
x_misc;
|
||||
|
||||
union
|
||||
{
|
||||
struct /* if ISFCN, tag, or .bb */
|
||||
{
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
}
|
||||
x_fcn;
|
||||
|
||||
struct /* if ISARY, up to 4 dimen. */
|
||||
{
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
}
|
||||
x_ary;
|
||||
}
|
||||
x_fcnary;
|
||||
|
||||
char x_tvndx[2]; /* tv index */
|
||||
}
|
||||
x_sym;
|
||||
|
||||
union
|
||||
{
|
||||
char x_fname[E_FILNMLEN];
|
||||
|
||||
struct
|
||||
{
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
}
|
||||
x_n;
|
||||
}
|
||||
x_file;
|
||||
|
||||
struct
|
||||
{
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
}
|
||||
x_scn;
|
||||
|
||||
struct
|
||||
{
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
}
|
||||
x_tv; /* info about .tv section
|
||||
(in auxent of symbol .tv)) */
|
||||
};
|
||||
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
@@ -1,318 +0,0 @@
|
||||
/* pe.h - PE COFF header information
|
||||
|
||||
Copyright 1999, 2000, 2001, 2003, 2004 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
#ifndef _PE_H
|
||||
#define _PE_H
|
||||
|
||||
/* NT specific file attributes. */
|
||||
#define IMAGE_FILE_RELOCS_STRIPPED 0x0001
|
||||
#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002
|
||||
#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004
|
||||
#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008
|
||||
#define IMAGE_FILE_AGGRESSIVE_WS_TRIM 0x0010
|
||||
#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020
|
||||
#define IMAGE_FILE_16BIT_MACHINE 0x0040
|
||||
#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080
|
||||
#define IMAGE_FILE_32BIT_MACHINE 0x0100
|
||||
#define IMAGE_FILE_DEBUG_STRIPPED 0x0200
|
||||
#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400
|
||||
#define IMAGE_FILE_NET_RUN_FROM_SWAP 0x0800
|
||||
#define IMAGE_FILE_SYSTEM 0x1000
|
||||
#define IMAGE_FILE_DLL 0x2000
|
||||
#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000
|
||||
#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
|
||||
|
||||
/* Additional flags to be set for section headers to allow the NT loader to
|
||||
read and write to the section data (to replace the addresses of data in
|
||||
dlls for one thing); also to execute the section in .text's case. */
|
||||
#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000
|
||||
#define IMAGE_SCN_MEM_EXECUTE 0x20000000
|
||||
#define IMAGE_SCN_MEM_READ 0x40000000
|
||||
#define IMAGE_SCN_MEM_WRITE 0x80000000
|
||||
|
||||
/* Section characteristics added for ppc-nt. */
|
||||
|
||||
#define IMAGE_SCN_TYPE_NO_PAD 0x00000008 /* Reserved. */
|
||||
|
||||
#define IMAGE_SCN_CNT_CODE 0x00000020 /* Section contains code. */
|
||||
#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 /* Section contains initialized data. */
|
||||
#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 /* Section contains uninitialized data. */
|
||||
|
||||
#define IMAGE_SCN_LNK_OTHER 0x00000100 /* Reserved. */
|
||||
#define IMAGE_SCN_LNK_INFO 0x00000200 /* Section contains comments or some other type of information. */
|
||||
#define IMAGE_SCN_LNK_REMOVE 0x00000800 /* Section contents will not become part of image. */
|
||||
#define IMAGE_SCN_LNK_COMDAT 0x00001000 /* Section contents comdat. */
|
||||
|
||||
#define IMAGE_SCN_MEM_FARDATA 0x00008000
|
||||
|
||||
#define IMAGE_SCN_MEM_PURGEABLE 0x00020000
|
||||
#define IMAGE_SCN_MEM_16BIT 0x00020000
|
||||
#define IMAGE_SCN_MEM_LOCKED 0x00040000
|
||||
#define IMAGE_SCN_MEM_PRELOAD 0x00080000
|
||||
|
||||
#define IMAGE_SCN_ALIGN_1BYTES 0x00100000
|
||||
#define IMAGE_SCN_ALIGN_2BYTES 0x00200000
|
||||
#define IMAGE_SCN_ALIGN_4BYTES 0x00300000
|
||||
#define IMAGE_SCN_ALIGN_8BYTES 0x00400000
|
||||
#define IMAGE_SCN_ALIGN_16BYTES 0x00500000 /* Default alignment if no others are specified. */
|
||||
#define IMAGE_SCN_ALIGN_32BYTES 0x00600000
|
||||
#define IMAGE_SCN_ALIGN_64BYTES 0x00700000
|
||||
|
||||
#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 /* Section contains extended relocations. */
|
||||
#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 /* Section is not cachable. */
|
||||
#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 /* Section is not pageable. */
|
||||
#define IMAGE_SCN_MEM_SHARED 0x10000000 /* Section is shareable. */
|
||||
|
||||
/* COMDAT selection codes. */
|
||||
|
||||
#define IMAGE_COMDAT_SELECT_NODUPLICATES (1) /* Warn if duplicates. */
|
||||
#define IMAGE_COMDAT_SELECT_ANY (2) /* No warning. */
|
||||
#define IMAGE_COMDAT_SELECT_SAME_SIZE (3) /* Warn if different size. */
|
||||
#define IMAGE_COMDAT_SELECT_EXACT_MATCH (4) /* Warn if different. */
|
||||
#define IMAGE_COMDAT_SELECT_ASSOCIATIVE (5) /* Base on other section. */
|
||||
|
||||
/* Machine numbers. */
|
||||
|
||||
#define IMAGE_FILE_MACHINE_UNKNOWN 0x0000
|
||||
#define IMAGE_FILE_MACHINE_ALPHA 0x0184
|
||||
#define IMAGE_FILE_MACHINE_ALPHA64 0x0284
|
||||
#define IMAGE_FILE_MACHINE_AM33 0x01d3
|
||||
#define IMAGE_FILE_MACHINE_AMD64 0x8664
|
||||
#define IMAGE_FILE_MACHINE_ARM 0x01c0
|
||||
#define IMAGE_FILE_MACHINE_AXP64 IMAGE_FILE_MACHINE_ALPHA64
|
||||
#define IMAGE_FILE_MACHINE_CEE 0xc0ee
|
||||
#define IMAGE_FILE_MACHINE_CEF 0x0cef
|
||||
#define IMAGE_FILE_MACHINE_EBC 0x0ebc
|
||||
#define IMAGE_FILE_MACHINE_I386 0x014c
|
||||
#define IMAGE_FILE_MACHINE_IA64 0x0200
|
||||
#define IMAGE_FILE_MACHINE_M32R 0x9041
|
||||
#define IMAGE_FILE_MACHINE_M68K 0x0268
|
||||
#define IMAGE_FILE_MACHINE_MIPS16 0x0266
|
||||
#define IMAGE_FILE_MACHINE_MIPSFPU 0x0366
|
||||
#define IMAGE_FILE_MACHINE_MIPSFPU16 0x0466
|
||||
#define IMAGE_FILE_MACHINE_POWERPC 0x01f0
|
||||
#define IMAGE_FILE_MACHINE_POWERPCFP 0x01f1
|
||||
#define IMAGE_FILE_MACHINE_R10000 0x0168
|
||||
#define IMAGE_FILE_MACHINE_R3000 0x0162
|
||||
#define IMAGE_FILE_MACHINE_R4000 0x0166
|
||||
#define IMAGE_FILE_MACHINE_SH3 0x01a2
|
||||
#define IMAGE_FILE_MACHINE_SH3DSP 0x01a3
|
||||
#define IMAGE_FILE_MACHINE_SH3E 0x01a4
|
||||
#define IMAGE_FILE_MACHINE_SH4 0x01a6
|
||||
#define IMAGE_FILE_MACHINE_SH5 0x01a8
|
||||
#define IMAGE_FILE_MACHINE_THUMB 0x01c2
|
||||
#define IMAGE_FILE_MACHINE_TRICORE 0x0520
|
||||
#define IMAGE_FILE_MACHINE_WCEMIPSV2 0x0169
|
||||
|
||||
#define IMAGE_SUBSYSTEM_UNKNOWN 0
|
||||
#define IMAGE_SUBSYSTEM_NATIVE 1
|
||||
#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2
|
||||
#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3
|
||||
#define IMAGE_SUBSYSTEM_POSIX_CUI 7
|
||||
#define IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9
|
||||
#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
|
||||
#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
|
||||
#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
|
||||
|
||||
/* Magic values that are true for all dos/nt implementations. */
|
||||
#define DOSMAGIC 0x5a4d
|
||||
#define NT_SIGNATURE 0x00004550
|
||||
|
||||
/* NT allows long filenames, we want to accommodate this.
|
||||
This may break some of the bfd functions. */
|
||||
#undef FILNMLEN
|
||||
#define FILNMLEN 18 /* # characters in a file name. */
|
||||
|
||||
struct external_PEI_DOS_hdr
|
||||
{
|
||||
/* DOS header fields - always at offset zero in the EXE file. */
|
||||
char e_magic[2]; /* Magic number, 0x5a4d. */
|
||||
char e_cblp[2]; /* Bytes on last page of file, 0x90. */
|
||||
char e_cp[2]; /* Pages in file, 0x3. */
|
||||
char e_crlc[2]; /* Relocations, 0x0. */
|
||||
char e_cparhdr[2]; /* Size of header in paragraphs, 0x4. */
|
||||
char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0. */
|
||||
char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF. */
|
||||
char e_ss[2]; /* Initial (relative) SS value, 0x0. */
|
||||
char e_sp[2]; /* Initial SP value, 0xb8. */
|
||||
char e_csum[2]; /* Checksum, 0x0. */
|
||||
char e_ip[2]; /* Initial IP value, 0x0. */
|
||||
char e_cs[2]; /* Initial (relative) CS value, 0x0. */
|
||||
char e_lfarlc[2]; /* File address of relocation table, 0x40. */
|
||||
char e_ovno[2]; /* Overlay number, 0x0. */
|
||||
char e_res[4][2]; /* Reserved words, all 0x0. */
|
||||
char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0. */
|
||||
char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0. */
|
||||
char e_res2[10][2]; /* Reserved words, all 0x0. */
|
||||
char e_lfanew[4]; /* File address of new exe header, usually 0x80. */
|
||||
char dos_message[16][4]; /* Other stuff, always follow DOS header. */
|
||||
};
|
||||
|
||||
struct external_PEI_IMAGE_hdr
|
||||
{
|
||||
char nt_signature[4]; /* required NT signature, 0x4550. */
|
||||
|
||||
/* From standard header. */
|
||||
char f_magic[2]; /* Magic number. */
|
||||
char f_nscns[2]; /* Number of sections. */
|
||||
char f_timdat[4]; /* Time & date stamp. */
|
||||
char f_symptr[4]; /* File pointer to symtab. */
|
||||
char f_nsyms[4]; /* Number of symtab entries. */
|
||||
char f_opthdr[2]; /* Sizeof(optional hdr). */
|
||||
char f_flags[2]; /* Flags. */
|
||||
};
|
||||
|
||||
struct external_PEI_filehdr
|
||||
{
|
||||
/* DOS header fields - always at offset zero in the EXE file. */
|
||||
char e_magic[2]; /* Magic number, 0x5a4d. */
|
||||
char e_cblp[2]; /* Bytes on last page of file, 0x90. */
|
||||
char e_cp[2]; /* Pages in file, 0x3. */
|
||||
char e_crlc[2]; /* Relocations, 0x0. */
|
||||
char e_cparhdr[2]; /* Size of header in paragraphs, 0x4. */
|
||||
char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0. */
|
||||
char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF. */
|
||||
char e_ss[2]; /* Initial (relative) SS value, 0x0. */
|
||||
char e_sp[2]; /* Initial SP value, 0xb8. */
|
||||
char e_csum[2]; /* Checksum, 0x0. */
|
||||
char e_ip[2]; /* Initial IP value, 0x0. */
|
||||
char e_cs[2]; /* Initial (relative) CS value, 0x0. */
|
||||
char e_lfarlc[2]; /* File address of relocation table, 0x40. */
|
||||
char e_ovno[2]; /* Overlay number, 0x0. */
|
||||
char e_res[4][2]; /* Reserved words, all 0x0. */
|
||||
char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0. */
|
||||
char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0. */
|
||||
char e_res2[10][2]; /* Reserved words, all 0x0. */
|
||||
char e_lfanew[4]; /* File address of new exe header, usually 0x80. */
|
||||
char dos_message[16][4]; /* Other stuff, always follow DOS header. */
|
||||
|
||||
/* Note: additional bytes may be inserted before the signature. Use
|
||||
the e_lfanew field to find the actual location of the NT signature. */
|
||||
|
||||
char nt_signature[4]; /* required NT signature, 0x4550. */
|
||||
|
||||
/* From standard header. */
|
||||
char f_magic[2]; /* Magic number. */
|
||||
char f_nscns[2]; /* Number of sections. */
|
||||
char f_timdat[4]; /* Time & date stamp. */
|
||||
char f_symptr[4]; /* File pointer to symtab. */
|
||||
char f_nsyms[4]; /* Number of symtab entries. */
|
||||
char f_opthdr[2]; /* Sizeof(optional hdr). */
|
||||
char f_flags[2]; /* Flags. */
|
||||
};
|
||||
|
||||
#ifdef COFF_IMAGE_WITH_PE
|
||||
|
||||
/* The filehdr is only weird in images. */
|
||||
|
||||
#undef FILHDR
|
||||
#define FILHDR struct external_PEI_filehdr
|
||||
#undef FILHSZ
|
||||
#define FILHSZ 152
|
||||
|
||||
#endif /* COFF_IMAGE_WITH_PE */
|
||||
|
||||
/* 32-bit PE a.out header: */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
AOUTHDR standard;
|
||||
|
||||
/* NT extra fields; see internal.h for descriptions. */
|
||||
char ImageBase[4];
|
||||
char SectionAlignment[4];
|
||||
char FileAlignment[4];
|
||||
char MajorOperatingSystemVersion[2];
|
||||
char MinorOperatingSystemVersion[2];
|
||||
char MajorImageVersion[2];
|
||||
char MinorImageVersion[2];
|
||||
char MajorSubsystemVersion[2];
|
||||
char MinorSubsystemVersion[2];
|
||||
char Reserved1[4];
|
||||
char SizeOfImage[4];
|
||||
char SizeOfHeaders[4];
|
||||
char CheckSum[4];
|
||||
char Subsystem[2];
|
||||
char DllCharacteristics[2];
|
||||
char SizeOfStackReserve[4];
|
||||
char SizeOfStackCommit[4];
|
||||
char SizeOfHeapReserve[4];
|
||||
char SizeOfHeapCommit[4];
|
||||
char LoaderFlags[4];
|
||||
char NumberOfRvaAndSizes[4];
|
||||
/* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
|
||||
char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars. */
|
||||
} PEAOUTHDR;
|
||||
#undef AOUTSZ
|
||||
#define AOUTSZ (AOUTHDRSZ + 196)
|
||||
|
||||
/* Like PEAOUTHDR, except that the "standard" member has no BaseOfData
|
||||
(aka data_start) member and that some of the members are 8 instead
|
||||
of just 4 bytes long. */
|
||||
typedef struct
|
||||
{
|
||||
AOUTHDR standard;
|
||||
|
||||
/* NT extra fields; see internal.h for descriptions. */
|
||||
char ImageBase[8];
|
||||
char SectionAlignment[4];
|
||||
char FileAlignment[4];
|
||||
char MajorOperatingSystemVersion[2];
|
||||
char MinorOperatingSystemVersion[2];
|
||||
char MajorImageVersion[2];
|
||||
char MinorImageVersion[2];
|
||||
char MajorSubsystemVersion[2];
|
||||
char MinorSubsystemVersion[2];
|
||||
char Reserved1[4];
|
||||
char SizeOfImage[4];
|
||||
char SizeOfHeaders[4];
|
||||
char CheckSum[4];
|
||||
char Subsystem[2];
|
||||
char DllCharacteristics[2];
|
||||
char SizeOfStackReserve[8];
|
||||
char SizeOfStackCommit[8];
|
||||
char SizeOfHeapReserve[8];
|
||||
char SizeOfHeapCommit[8];
|
||||
char LoaderFlags[4];
|
||||
char NumberOfRvaAndSizes[4];
|
||||
/* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
|
||||
char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars. */
|
||||
} PEPAOUTHDR;
|
||||
#define PEPAOUTSZ 240
|
||||
|
||||
#undef E_FILNMLEN
|
||||
#define E_FILNMLEN 18 /* # characters in a file name. */
|
||||
|
||||
/* Import Tyoes fot ILF format object files.. */
|
||||
#define IMPORT_CODE 0
|
||||
#define IMPORT_DATA 1
|
||||
#define IMPORT_CONST 2
|
||||
|
||||
/* Import Name Tyoes for ILF format object files. */
|
||||
#define IMPORT_ORDINAL 0
|
||||
#define IMPORT_NAME 1
|
||||
#define IMPORT_NAME_NOPREFIX 2
|
||||
#define IMPORT_NAME_UNDECORATE 3
|
||||
|
||||
/* Weak external characteristics. */
|
||||
#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
|
||||
#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
|
||||
#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
|
||||
|
||||
#endif /* _PE_H */
|
||||
@@ -1,58 +0,0 @@
|
||||
/* Basic coff information for the PowerPC
|
||||
Based on coff/rs6000.h, coff/i386.h and others.
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Initial release: Kim Knuttila (krk@cygnus.com) */
|
||||
#define L_LNNO_SIZE 2
|
||||
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
|
||||
#include "coff/external.h"
|
||||
|
||||
/* Bits for f_flags:
|
||||
F_RELFLG relocation info stripped from file
|
||||
F_EXEC file is executable (no unresolved external references)
|
||||
F_LNNO line numbers stripped from file
|
||||
F_LSYMS local symbols stripped from file
|
||||
F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
|
||||
/* extra NT defines */
|
||||
#define PPCMAGIC 0760 /* peeked on aa PowerPC Windows NT box */
|
||||
#define DOSMAGIC 0x5a4d /* from arm.h, i386.h */
|
||||
#define NT_SIGNATURE 0x00004550 /* from arm.h, i386.h */
|
||||
|
||||
/* from winnt.h */
|
||||
#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
|
||||
|
||||
#define PPCBADMAG(x) ((x).f_magic != PPCMAGIC)
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
@@ -1,267 +0,0 @@
|
||||
/* IBM RS/6000 "XCOFF" file definitions for BFD.
|
||||
Copyright (C) 1990, 1991, 2001 Free Software Foundation, Inc.
|
||||
FIXME: Can someone provide a transliteration of this name into ASCII?
|
||||
Using the following chars caused a compiler warning on HIUX (so I replaced
|
||||
them with octal escapes), and isn't useful without an understanding of what
|
||||
character set it is.
|
||||
Written by Mimi Ph\373\364ng-Th\345o V\365 of IBM
|
||||
and John Gilmore of Cygnus Support. */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
/* IBM RS/6000 */
|
||||
#define U802WRMAGIC 0730 /* writeable text segments **chh** */
|
||||
#define U802ROMAGIC 0735 /* readonly sharable text segments */
|
||||
#define U802TOCMAGIC 0737 /* readonly text segments and TOC */
|
||||
|
||||
#define BADMAG(x) \
|
||||
((x).f_magic != U802ROMAGIC && (x).f_magic != U802WRMAGIC && \
|
||||
(x).f_magic != U802TOCMAGIC)
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char magic[2]; /* type of file */
|
||||
unsigned char vstamp[2]; /* version stamp */
|
||||
unsigned char tsize[4]; /* text size in bytes, padded to FW bdry */
|
||||
unsigned char dsize[4]; /* initialized data " " */
|
||||
unsigned char bsize[4]; /* uninitialized data " " */
|
||||
unsigned char entry[4]; /* entry pt. */
|
||||
unsigned char text_start[4]; /* base of text used for this file */
|
||||
unsigned char data_start[4]; /* base of data used for this file */
|
||||
unsigned char o_toc[4]; /* address of TOC */
|
||||
unsigned char o_snentry[2]; /* section number of entry point */
|
||||
unsigned char o_sntext[2]; /* section number of .text section */
|
||||
unsigned char o_sndata[2]; /* section number of .data section */
|
||||
unsigned char o_sntoc[2]; /* section number of TOC */
|
||||
unsigned char o_snloader[2]; /* section number of .loader section */
|
||||
unsigned char o_snbss[2]; /* section number of .bss section */
|
||||
unsigned char o_algntext[2]; /* .text alignment */
|
||||
unsigned char o_algndata[2]; /* .data alignment */
|
||||
unsigned char o_modtype[2]; /* module type (??) */
|
||||
unsigned char o_cputype[2]; /* cpu type */
|
||||
unsigned char o_maxstack[4]; /* max stack size (??) */
|
||||
unsigned char o_maxdata[4]; /* max data size (??) */
|
||||
unsigned char o_resv2[12]; /* reserved */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
#define AOUTSZ 72
|
||||
#define SMALL_AOUTSZ (28)
|
||||
#define AOUTHDRSZ 72
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
struct {
|
||||
unsigned char x_scnlen[4];
|
||||
unsigned char x_parmhash[4];
|
||||
unsigned char x_snhash[2];
|
||||
unsigned char x_smtyp[1];
|
||||
unsigned char x_smclas[1];
|
||||
unsigned char x_stab[4];
|
||||
unsigned char x_snstab[2];
|
||||
} x_csect;
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
#define DBXMASK 0x80 /* for dbx storage mask */
|
||||
#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK)
|
||||
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_size[1];
|
||||
char r_type[1];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
#define DEFAULT_DATA_SECTION_ALIGNMENT 4
|
||||
#define DEFAULT_BSS_SECTION_ALIGNMENT 4
|
||||
#define DEFAULT_TEXT_SECTION_ALIGNMENT 4
|
||||
/* For new sections we havn't heard of before */
|
||||
#define DEFAULT_SECTION_ALIGNMENT 4
|
||||
|
||||
/* The ldhdr structure. This appears at the start of the .loader
|
||||
section. */
|
||||
|
||||
struct external_ldhdr
|
||||
{
|
||||
bfd_byte l_version[4];
|
||||
bfd_byte l_nsyms[4];
|
||||
bfd_byte l_nreloc[4];
|
||||
bfd_byte l_istlen[4];
|
||||
bfd_byte l_nimpid[4];
|
||||
bfd_byte l_impoff[4];
|
||||
bfd_byte l_stlen[4];
|
||||
bfd_byte l_stoff[4];
|
||||
};
|
||||
|
||||
#define LDHDRSZ (8 * 4)
|
||||
|
||||
struct external_ldsym
|
||||
{
|
||||
union
|
||||
{
|
||||
bfd_byte _l_name[SYMNMLEN];
|
||||
struct
|
||||
{
|
||||
bfd_byte _l_zeroes[4];
|
||||
bfd_byte _l_offset[4];
|
||||
} _l_l;
|
||||
} _l;
|
||||
bfd_byte l_value[4];
|
||||
bfd_byte l_scnum[2];
|
||||
bfd_byte l_smtype[1];
|
||||
bfd_byte l_smclas[1];
|
||||
bfd_byte l_ifile[4];
|
||||
bfd_byte l_parm[4];
|
||||
};
|
||||
|
||||
#define LDSYMSZ (8 + 3 * 4 + 2 + 2)
|
||||
|
||||
struct external_ldrel
|
||||
{
|
||||
bfd_byte l_vaddr[4];
|
||||
bfd_byte l_symndx[4];
|
||||
bfd_byte l_rtype[2];
|
||||
bfd_byte l_rsecnm[2];
|
||||
};
|
||||
|
||||
#define LDRELSZ (2 * 4 + 2 * 2)
|
||||
@@ -1,260 +0,0 @@
|
||||
/* IBM RS/6000 "XCOFF64" file definitions for BFD.
|
||||
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr
|
||||
{
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[8]; /* file pointer to symtab */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
};
|
||||
|
||||
/* IBM RS/6000. */
|
||||
#define U803XTOCMAGIC 0757 /* Aix 4.3 64-bit XCOFF */
|
||||
#define U64_TOCMAGIC 0767 /* AIX 5+ 64-bit XCOFF */
|
||||
#define BADMAG(x) ((x).f_magic != U803XTOCMAGIC && (x).f_magic != U64_TOCMAGIC)
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 24
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char magic[2]; /* type of file */
|
||||
unsigned char vstamp[2]; /* version stamp */
|
||||
unsigned char o_debugger[4]; /* reserved */
|
||||
unsigned char text_start[8]; /* base of text used for this file */
|
||||
unsigned char data_start[8]; /* base of data used for this file */
|
||||
unsigned char o_toc[8]; /* address of TOC */
|
||||
unsigned char o_snentry[2]; /* section number of entry point */
|
||||
unsigned char o_sntext[2]; /* section number of .text section */
|
||||
unsigned char o_sndata[2]; /* section number of .data section */
|
||||
unsigned char o_sntoc[2]; /* section number of TOC */
|
||||
unsigned char o_snloader[2]; /* section number of .loader section */
|
||||
unsigned char o_snbss[2]; /* section number of .bss section */
|
||||
unsigned char o_algntext[2]; /* .text alignment */
|
||||
unsigned char o_algndata[2]; /* .data alignment */
|
||||
unsigned char o_modtype[2]; /* module type (??) */
|
||||
unsigned char o_cputype[2]; /* cpu type */
|
||||
unsigned char o_resv2[4]; /* reserved */
|
||||
unsigned char tsize[8]; /* text size bytes, padded to FW bdry */
|
||||
unsigned char dsize[8]; /* initialized data " " */
|
||||
unsigned char bsize[8]; /* uninitialized data " " */
|
||||
unsigned char entry[8]; /* entry pt. */
|
||||
unsigned char o_maxstack[8]; /* max stack size (??) */
|
||||
unsigned char o_maxdata[8]; /* max data size (??) */
|
||||
unsigned char o_resv3[16]; /* reserved */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
#define AOUTSZ 120
|
||||
#define SMALL_AOUTSZ (0)
|
||||
#define AOUTHDRSZ 72
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
struct external_scnhdr
|
||||
{
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[8]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[8]; /* virtual address */
|
||||
char s_size[8]; /* section size */
|
||||
char s_scnptr[8]; /* file ptr to raw data for section */
|
||||
char s_relptr[8]; /* file ptr to relocation */
|
||||
char s_lnnoptr[8]; /* file ptr to line numbers */
|
||||
char s_nreloc[4]; /* number of relocation entries */
|
||||
char s_nlnno[4]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
char s_pad[4]; /* padding */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
|
||||
#define SCNHSZ 72
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
Line numbers are grouped on a per function basis; first entry in a function
|
||||
grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
symbol table index of the function name. */
|
||||
|
||||
struct external_lineno
|
||||
{
|
||||
union
|
||||
{
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[8]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
|
||||
char l_lnno[4]; /* line number */
|
||||
};
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
|
||||
#define LINESZ 12
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
char e_value[8];
|
||||
char e_offset[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
union external_auxent
|
||||
{
|
||||
struct {
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[4]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
struct {
|
||||
char x_lnnoptr[8];/* ptr to fcn line */
|
||||
char x_fsize[4]; /* size of function */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
} x_fcnary;
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
char x_pad[6];
|
||||
unsigned char x_ftype[1];
|
||||
unsigned char x_resv[2];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_exptr[8];
|
||||
char x_fsize[4];
|
||||
char x_endndx[4];
|
||||
char x_pad[1];
|
||||
} x_except;
|
||||
|
||||
struct {
|
||||
unsigned char x_scnlen_lo[4];
|
||||
unsigned char x_parmhash[4];
|
||||
unsigned char x_snhash[2];
|
||||
unsigned char x_smtyp[1];
|
||||
unsigned char x_smclas[1];
|
||||
unsigned char x_scnlen_hi[4];
|
||||
unsigned char x_pad[1];
|
||||
} x_csect;
|
||||
|
||||
struct {
|
||||
char x_pad[17];
|
||||
char x_auxtype[1];
|
||||
} x_auxtype;
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
#define DBXMASK 0x80 /* for dbx storage mask */
|
||||
#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK)
|
||||
|
||||
/* Values for auxtype field in XCOFF64, taken from AIX 4.3 sym.h. */
|
||||
#define _AUX_EXCEPT 255
|
||||
#define _AUX_FCN 254
|
||||
#define _AUX_SYM 253
|
||||
#define _AUX_FILE 252
|
||||
#define _AUX_CSECT 251
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[8];
|
||||
char r_symndx[4];
|
||||
char r_size[1];
|
||||
char r_type[1];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 14
|
||||
|
||||
#define DEFAULT_DATA_SECTION_ALIGNMENT 4
|
||||
#define DEFAULT_BSS_SECTION_ALIGNMENT 4
|
||||
#define DEFAULT_TEXT_SECTION_ALIGNMENT 4
|
||||
/* For new sections we havn't heard of before */
|
||||
#define DEFAULT_SECTION_ALIGNMENT 4
|
||||
|
||||
/* The ldhdr structure. This appears at the start of the .loader
|
||||
section. */
|
||||
|
||||
struct external_ldhdr
|
||||
{
|
||||
bfd_byte l_version[4];
|
||||
bfd_byte l_nsyms[4];
|
||||
bfd_byte l_nreloc[4];
|
||||
bfd_byte l_istlen[4];
|
||||
bfd_byte l_nimpid[4];
|
||||
bfd_byte l_stlen[4];
|
||||
bfd_byte l_impoff[8];
|
||||
bfd_byte l_stoff[8];
|
||||
bfd_byte l_symoff[8];
|
||||
bfd_byte l_rldoff[8];
|
||||
};
|
||||
#define LDHDRSZ (56)
|
||||
|
||||
struct external_ldsym
|
||||
{
|
||||
bfd_byte l_value[8];
|
||||
bfd_byte l_offset[4];
|
||||
bfd_byte l_scnum[2];
|
||||
bfd_byte l_smtype[1];
|
||||
bfd_byte l_smclas[1];
|
||||
bfd_byte l_ifile[4];
|
||||
bfd_byte l_parm[4];
|
||||
};
|
||||
|
||||
#define LDSYMSZ (24)
|
||||
|
||||
struct external_ldrel
|
||||
{
|
||||
bfd_byte l_vaddr[8];
|
||||
bfd_byte l_rtype[2];
|
||||
bfd_byte l_rsecnm[2];
|
||||
bfd_byte l_symndx[4];
|
||||
};
|
||||
|
||||
#define LDRELSZ (16)
|
||||
@@ -1,147 +0,0 @@
|
||||
/* coff information for Renesas SH
|
||||
|
||||
Copyright 2000, 2003 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifdef COFF_WITH_PE
|
||||
#define L_LNNO_SIZE 2
|
||||
#else
|
||||
#define L_LNNO_SIZE 4
|
||||
#endif
|
||||
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
|
||||
#include "coff/external.h"
|
||||
|
||||
#define SH_ARCH_MAGIC_BIG 0x0500
|
||||
#define SH_ARCH_MAGIC_LITTLE 0x0550 /* Little endian SH */
|
||||
#define SH_ARCH_MAGIC_WINCE 0x01a2 /* Windows CE - little endian */
|
||||
#define SH_PE_MAGIC 0x010b
|
||||
|
||||
#define SHBADMAG(x) \
|
||||
(((x).f_magic != SH_ARCH_MAGIC_BIG) && \
|
||||
((x).f_magic != SH_ARCH_MAGIC_WINCE) && \
|
||||
((x).f_magic != SH_ARCH_MAGIC_LITTLE))
|
||||
|
||||
/* Define some NT default values. */
|
||||
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
|
||||
#define NT_SECTION_ALIGNMENT 0x1000
|
||||
#define NT_FILE_ALIGNMENT 0x200
|
||||
#define NT_DEF_RESERVE 0x100000
|
||||
#define NT_DEF_COMMIT 0x1000
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the h8 don't have room in the instruction for the entire
|
||||
offset - eg the strange jump and high page addressing modes. */
|
||||
|
||||
#ifndef COFF_WITH_PE
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
#else
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
#endif
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#ifdef COFF_WITH_PE
|
||||
#define RELSZ 10
|
||||
#else
|
||||
#define RELSZ 16
|
||||
#endif
|
||||
|
||||
/* SH relocation types. Not all of these are actually used. */
|
||||
|
||||
#define R_SH_UNUSED 0 /* only used internally */
|
||||
#define R_SH_IMM32CE 2 /* 32 bit immediate for WinCE */
|
||||
#define R_SH_PCREL8 3 /* 8 bit pcrel */
|
||||
#define R_SH_PCREL16 4 /* 16 bit pcrel */
|
||||
#define R_SH_HIGH8 5 /* high 8 bits of 24 bit address */
|
||||
#define R_SH_LOW16 7 /* low 16 bits of 24 bit immediate */
|
||||
#define R_SH_IMM24 6 /* 24 bit immediate */
|
||||
#define R_SH_PCDISP8BY4 9 /* PC rel 8 bits *4 +ve */
|
||||
#define R_SH_PCDISP8BY2 10 /* PC rel 8 bits *2 +ve */
|
||||
#define R_SH_PCDISP8 11 /* 8 bit branch */
|
||||
#define R_SH_PCDISP 12 /* 12 bit branch */
|
||||
#define R_SH_IMM32 14 /* 32 bit immediate */
|
||||
#define R_SH_IMM8 16 /* 8 bit immediate */
|
||||
#define R_SH_IMAGEBASE 16 /* Windows CE */
|
||||
#define R_SH_IMM8BY2 17 /* 8 bit immediate *2 */
|
||||
#define R_SH_IMM8BY4 18 /* 8 bit immediate *4 */
|
||||
#define R_SH_IMM4 19 /* 4 bit immediate */
|
||||
#define R_SH_IMM4BY2 20 /* 4 bit immediate *2 */
|
||||
#define R_SH_IMM4BY4 21 /* 4 bit immediate *4 */
|
||||
#define R_SH_PCRELIMM8BY2 22 /* PC rel 8 bits *2 unsigned */
|
||||
#define R_SH_PCRELIMM8BY4 23 /* PC rel 8 bits *4 unsigned */
|
||||
#define R_SH_IMM16 24 /* 16 bit immediate */
|
||||
|
||||
/* The switch table reloc types are used for relaxing. They are
|
||||
generated for expressions such as
|
||||
.word L1 - L2
|
||||
The r_offset field holds the difference between the reloc address
|
||||
and L2. */
|
||||
#define R_SH_SWITCH8 33 /* 8 bit switch table entry */
|
||||
#define R_SH_SWITCH16 25 /* 16 bit switch table entry */
|
||||
#define R_SH_SWITCH32 26 /* 32 bit switch table entry */
|
||||
|
||||
/* The USES reloc type is used for relaxing. The compiler will
|
||||
generate .uses pseudo-ops when it finds a function call which it
|
||||
can relax. The r_offset field of the USES reloc holds the PC
|
||||
relative offset to the instruction which loads the register used in
|
||||
the function call. */
|
||||
#define R_SH_USES 27 /* .uses pseudo-op */
|
||||
|
||||
/* The COUNT reloc type is used for relaxing. The assembler will
|
||||
generate COUNT relocs for addresses referred to by the register
|
||||
loads associated with USES relocs. The r_offset field of the COUNT
|
||||
reloc holds the number of times the address is referenced in the
|
||||
object file. */
|
||||
#define R_SH_COUNT 28 /* Count of constant pool uses */
|
||||
|
||||
/* The ALIGN reloc type is used for relaxing. The r_offset field is
|
||||
the power of two to which subsequent portions of the object file
|
||||
must be aligned. */
|
||||
#define R_SH_ALIGN 29 /* .align pseudo-op */
|
||||
|
||||
/* The CODE and DATA reloc types are used for aligning load and store
|
||||
instructions. The assembler will generate a CODE reloc before a
|
||||
block of instructions. It will generate a DATA reloc before data.
|
||||
A section should be processed assuming it contains data, unless a
|
||||
CODE reloc is seen. The only relevant pieces of information in the
|
||||
CODE and DATA relocs are the section and the address. The symbol
|
||||
and offset are meaningless. */
|
||||
#define R_SH_CODE 30 /* start of code */
|
||||
#define R_SH_DATA 31 /* start of data */
|
||||
|
||||
/* The LABEL reloc type is used for aligning load and store
|
||||
instructions. The assembler will generate a LABEL reloc for each
|
||||
label within a block of instructions. This permits the linker to
|
||||
avoid swapping instructions which are the targets of branches. */
|
||||
#define R_SH_LABEL 32 /* label */
|
||||
|
||||
/* NB: R_SH_SWITCH8 is 33 */
|
||||
|
||||
#define R_SH_LOOP_START 34
|
||||
#define R_SH_LOOP_END 35
|
||||
@@ -1,155 +0,0 @@
|
||||
/* coff information for Sparc.
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* This file is an amalgamation of several standard include files that
|
||||
define coff format, such as filehdr.h, aouthdr.h, and so forth. In
|
||||
addition, all datatypes have been translated into character arrays of
|
||||
(presumed) equivalent size. This is necessary so that this file can
|
||||
be used with different systems while still yielding the same results. */
|
||||
|
||||
#define L_LNNO_SIZE 2
|
||||
#define DO_NOT_DEFINE_SYMENT
|
||||
#define DO_NOT_DEFINE_AUXENT
|
||||
#include "coff/external.h"
|
||||
|
||||
#define F_RELFLG (0x0001) /* relocation info stripped */
|
||||
#define F_EXEC (0x0002) /* file is executable */
|
||||
#define F_LNNO (0x0004) /* line numbers stripped */
|
||||
#define F_LSYMS (0x0008) /* local symbols stripped */
|
||||
|
||||
#define SPARCMAGIC (0540)
|
||||
|
||||
/* This is Lynx's all-platform magic number for executables. */
|
||||
|
||||
#define LYNXCOFFMAGIC (0415)
|
||||
|
||||
#define OMAGIC 0404 /* object files, eg as output */
|
||||
#define ZMAGIC 0413 /* demand load format, eg normal ld output */
|
||||
#define STMAGIC 0401 /* target shlib */
|
||||
#define SHMAGIC 0443 /* host shlib */
|
||||
|
||||
/* More names of "special" sections. */
|
||||
|
||||
#define _TV ".tv"
|
||||
#define _INIT ".init"
|
||||
#define _FINI ".fini"
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN (8) /* # characters in a symbol name */
|
||||
#define E_FILNMLEN (14) /* # characters in a file name */
|
||||
#define E_DIMNUM (4) /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
#if 0 /* of doubtful value */
|
||||
char e_nptr[2][4];
|
||||
struct {
|
||||
char e_leading_zero[1];
|
||||
char e_dbx_type[1];
|
||||
char e_dbx_desc[2];
|
||||
} e_dbx;
|
||||
#endif
|
||||
} e;
|
||||
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
char padding[2];
|
||||
};
|
||||
|
||||
#define N_BTMASK (0xf)
|
||||
#define N_TMASK (0x30)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
union external_auxent
|
||||
{
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* .tv section info (in auxent of sym .tv)) */
|
||||
|
||||
char x_fill[20]; /* forces to 20-byte size */
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 20
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 20
|
||||
|
||||
#define _ETEXT "etext"
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
char r_spare[2];
|
||||
char r_offset[4];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
@@ -1,484 +0,0 @@
|
||||
/* Declarations of internal format of MIPS ECOFF symbols.
|
||||
Originally contributed by MIPS Computer Systems and Third Eye Software.
|
||||
Changes contributed by Cygnus Support are in the public domain.
|
||||
|
||||
This file is just aggregated with the files that make up the GNU
|
||||
release; it is not considered part of GAS, GDB, or other GNU
|
||||
programs. */
|
||||
|
||||
/*
|
||||
* |-----------------------------------------------------------|
|
||||
* | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.|
|
||||
* | MIPS Computer Systems, Inc. grants reproduction and use |
|
||||
* | rights to all parties, PROVIDED that this comment is |
|
||||
* | maintained in the copy. |
|
||||
* |-----------------------------------------------------------|
|
||||
*/
|
||||
#ifndef _SYM_H
|
||||
#define _SYM_H
|
||||
|
||||
/* (C) Copyright 1984 by Third Eye Software, Inc.
|
||||
*
|
||||
* Third Eye Software, Inc. grants reproduction and use rights to
|
||||
* all parties, PROVIDED that this comment is maintained in the copy.
|
||||
*
|
||||
* Third Eye makes no claims about the applicability of this
|
||||
* symbol table to a particular use.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains the definition of the Third Eye Symbol Table.
|
||||
*
|
||||
* Symbols are assumed to be in 'encounter order' - i.e. the order that
|
||||
* the things they represent were encountered by the compiler/assembler/loader.
|
||||
* EXCEPT for globals! These are assumed to be bunched together,
|
||||
* probably right after the last 'normal' symbol. Globals ARE sorted
|
||||
* in ascending order.
|
||||
*
|
||||
* -----------------------------------------------------------------------
|
||||
* A brief word about Third Eye naming/use conventions:
|
||||
*
|
||||
* All arrays and index's are 0 based.
|
||||
* All "ifooMax" values are the highest legal value PLUS ONE. This makes
|
||||
* them good for allocating arrays, etc. All checks are "ifoo < ifooMax".
|
||||
*
|
||||
* "isym" Index into the SYMbol table.
|
||||
* "ipd" Index into the Procedure Descriptor array.
|
||||
* "ifd" Index into the File Descriptor array.
|
||||
* "iss" Index into String Space.
|
||||
* "cb" Count of Bytes.
|
||||
* "rgPd" array whose domain is "0..ipdMax-1" and RanGe is PDR.
|
||||
* "rgFd" array whose domain is "0..ifdMax-1" and RanGe is FDR.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Symbolic Header (HDR) structure.
|
||||
* As long as all the pointers are set correctly,
|
||||
* we don't care WHAT order the various sections come out in!
|
||||
*
|
||||
* A file produced solely for the use of CDB will probably NOT have
|
||||
* any instructions or data areas in it, as these are available
|
||||
* in the original.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
short magic; /* to verify validity of the table */
|
||||
short vstamp; /* version stamp */
|
||||
long ilineMax; /* number of line number entries */
|
||||
bfd_vma cbLine; /* number of bytes for line number entries */
|
||||
bfd_vma cbLineOffset; /* offset to start of line number entries*/
|
||||
long idnMax; /* max index into dense number table */
|
||||
bfd_vma cbDnOffset; /* offset to start dense number table */
|
||||
long ipdMax; /* number of procedures */
|
||||
bfd_vma cbPdOffset; /* offset to procedure descriptor table */
|
||||
long isymMax; /* number of local symbols */
|
||||
bfd_vma cbSymOffset; /* offset to start of local symbols*/
|
||||
long ioptMax; /* max index into optimization symbol entries */
|
||||
bfd_vma cbOptOffset; /* offset to optimization symbol entries */
|
||||
long iauxMax; /* number of auxillary symbol entries */
|
||||
bfd_vma cbAuxOffset; /* offset to start of auxillary symbol entries*/
|
||||
long issMax; /* max index into local strings */
|
||||
bfd_vma cbSsOffset; /* offset to start of local strings */
|
||||
long issExtMax; /* max index into external strings */
|
||||
bfd_vma cbSsExtOffset; /* offset to start of external strings */
|
||||
long ifdMax; /* number of file descriptor entries */
|
||||
bfd_vma cbFdOffset; /* offset to file descriptor table */
|
||||
long crfd; /* number of relative file descriptor entries */
|
||||
bfd_vma cbRfdOffset; /* offset to relative file descriptor table */
|
||||
long iextMax; /* max index into external symbols */
|
||||
bfd_vma cbExtOffset; /* offset to start of external symbol entries*/
|
||||
/* If you add machine dependent fields, add them here */
|
||||
} HDRR, *pHDRR;
|
||||
#define cbHDRR sizeof(HDRR)
|
||||
#define hdrNil ((pHDRR)0)
|
||||
|
||||
/*
|
||||
* The FDR and PDR structures speed mapping of address <-> name.
|
||||
* They are sorted in ascending memory order and are kept in
|
||||
* memory by CDB at runtime.
|
||||
*/
|
||||
|
||||
/*
|
||||
* File Descriptor
|
||||
*
|
||||
* There is one of these for EVERY FILE, whether compiled with
|
||||
* full debugging symbols or not. The name of a file should be
|
||||
* the path name given to the compiler. This allows the user
|
||||
* to simply specify the names of the directories where the COMPILES
|
||||
* were done, and we will be able to find their files.
|
||||
* A field whose comment starts with "R - " indicates that it will be
|
||||
* setup at runtime.
|
||||
*/
|
||||
typedef struct fdr {
|
||||
bfd_vma adr; /* memory address of beginning of file */
|
||||
long rss; /* file name (of source, if known) */
|
||||
long issBase; /* file's string space */
|
||||
bfd_vma cbSs; /* number of bytes in the ss */
|
||||
long isymBase; /* beginning of symbols */
|
||||
long csym; /* count file's of symbols */
|
||||
long ilineBase; /* file's line symbols */
|
||||
long cline; /* count of file's line symbols */
|
||||
long ioptBase; /* file's optimization entries */
|
||||
long copt; /* count of file's optimization entries */
|
||||
unsigned short ipdFirst;/* start of procedures for this file */
|
||||
short cpd; /* count of procedures for this file */
|
||||
long iauxBase; /* file's auxiliary entries */
|
||||
long caux; /* count of file's auxiliary entries */
|
||||
long rfdBase; /* index into the file indirect table */
|
||||
long crfd; /* count file indirect entries */
|
||||
unsigned lang: 5; /* language for this file */
|
||||
unsigned fMerge : 1; /* whether this file can be merged */
|
||||
unsigned fReadin : 1; /* true if it was read in (not just created) */
|
||||
unsigned fBigendian : 1;/* if set, was compiled on big endian machine */
|
||||
/* aux's will be in compile host's sex */
|
||||
unsigned glevel : 2; /* level this file was compiled with */
|
||||
unsigned reserved : 22; /* reserved for future use */
|
||||
bfd_vma cbLineOffset; /* byte offset from header for this file ln's */
|
||||
bfd_vma cbLine; /* size of lines for this file */
|
||||
} FDR, *pFDR;
|
||||
#define cbFDR sizeof(FDR)
|
||||
#define fdNil ((pFDR)0)
|
||||
#define ifdNil -1
|
||||
#define ifdTemp 0
|
||||
#define ilnNil -1
|
||||
|
||||
|
||||
/*
|
||||
* Procedure Descriptor
|
||||
*
|
||||
* There is one of these for EVERY TEXT LABEL.
|
||||
* If a procedure is in a file with full symbols, then isym
|
||||
* will point to the PROC symbols, else it will point to the
|
||||
* global symbol for the label.
|
||||
*/
|
||||
|
||||
typedef struct pdr {
|
||||
bfd_vma adr; /* memory address of start of procedure */
|
||||
long isym; /* start of local symbol entries */
|
||||
long iline; /* start of line number entries*/
|
||||
long regmask; /* save register mask */
|
||||
long regoffset; /* save register offset */
|
||||
long iopt; /* start of optimization symbol entries*/
|
||||
long fregmask; /* save floating point register mask */
|
||||
long fregoffset; /* save floating point register offset */
|
||||
long frameoffset; /* frame size */
|
||||
short framereg; /* frame pointer register */
|
||||
short pcreg; /* offset or reg of return pc */
|
||||
long lnLow; /* lowest line in the procedure */
|
||||
long lnHigh; /* highest line in the procedure */
|
||||
bfd_vma cbLineOffset; /* byte offset for this procedure from the fd base */
|
||||
/* These fields are new for 64 bit ECOFF. */
|
||||
unsigned gp_prologue : 8; /* byte size of GP prologue */
|
||||
unsigned gp_used : 1; /* true if the procedure uses GP */
|
||||
unsigned reg_frame : 1; /* true if register frame procedure */
|
||||
unsigned prof : 1; /* true if compiled with -pg */
|
||||
unsigned reserved : 13; /* reserved: must be zero */
|
||||
unsigned localoff : 8; /* offset of local variables from vfp */
|
||||
} PDR, *pPDR;
|
||||
#define cbPDR sizeof(PDR)
|
||||
#define pdNil ((pPDR) 0)
|
||||
#define ipdNil -1
|
||||
|
||||
/*
|
||||
* The structure of the runtime procedure descriptor created by the loader
|
||||
* for use by the static exception system.
|
||||
*/
|
||||
/*
|
||||
* If 0'd out because exception_info chokes Visual C++ and because there
|
||||
* don't seem to be any references to this structure elsewhere in gdb.
|
||||
*/
|
||||
#if 0
|
||||
typedef struct runtime_pdr {
|
||||
bfd_vma adr; /* memory address of start of procedure */
|
||||
long regmask; /* save register mask */
|
||||
long regoffset; /* save register offset */
|
||||
long fregmask; /* save floating point register mask */
|
||||
long fregoffset; /* save floating point register offset */
|
||||
long frameoffset; /* frame size */
|
||||
short framereg; /* frame pointer register */
|
||||
short pcreg; /* offset or reg of return pc */
|
||||
long irpss; /* index into the runtime string table */
|
||||
long reserved;
|
||||
struct exception_info *exception_info;/* pointer to exception array */
|
||||
} RPDR, *pRPDR;
|
||||
#define cbRPDR sizeof(RPDR)
|
||||
#define rpdNil ((pRPDR) 0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Line Numbers
|
||||
*
|
||||
* Line Numbers are segregated from the normal symbols because they
|
||||
* are [1] smaller , [2] are of no interest to your
|
||||
* average loader, and [3] are never needed in the middle of normal
|
||||
* scanning and therefore slow things down.
|
||||
*
|
||||
* By definition, the first LINER for any given procedure will have
|
||||
* the first line of a procedure and represent the first address.
|
||||
*/
|
||||
|
||||
typedef long LINER, *pLINER;
|
||||
#define lineNil ((pLINER)0)
|
||||
#define cbLINER sizeof(LINER)
|
||||
#define ilineNil -1
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The Symbol Structure (GFW, to those who Know!)
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
long iss; /* index into String Space of name */
|
||||
bfd_vma value; /* value of symbol */
|
||||
unsigned st : 6; /* symbol type */
|
||||
unsigned sc : 5; /* storage class - text, data, etc */
|
||||
unsigned reserved : 1; /* reserved */
|
||||
unsigned index : 20; /* index into sym/aux table */
|
||||
} SYMR, *pSYMR;
|
||||
#define symNil ((pSYMR)0)
|
||||
#define cbSYMR sizeof(SYMR)
|
||||
#define isymNil -1
|
||||
#define indexNil 0xfffff
|
||||
#define issNil -1
|
||||
#define issNull 0
|
||||
|
||||
|
||||
/* The following converts a memory resident string to an iss.
|
||||
* This hack is recognized in SbFIss, in sym.c of the debugger.
|
||||
*/
|
||||
#define IssFSb(sb) (0x80000000 | ((unsigned long)(sb)))
|
||||
|
||||
/* E X T E R N A L S Y M B O L R E C O R D
|
||||
*
|
||||
* Same as the SYMR except it contains file context to determine where
|
||||
* the index is.
|
||||
*/
|
||||
typedef struct ecoff_extr {
|
||||
unsigned jmptbl:1; /* symbol is a jump table entry for shlibs */
|
||||
unsigned cobol_main:1; /* symbol is a cobol main procedure */
|
||||
unsigned weakext:1; /* symbol is weak external */
|
||||
unsigned reserved:13; /* reserved for future use */
|
||||
int ifd; /* where the iss and index fields point into */
|
||||
SYMR asym; /* symbol for the external */
|
||||
} EXTR, *pEXTR;
|
||||
#define extNil ((pEXTR)0)
|
||||
#define cbEXTR sizeof(EXTR)
|
||||
|
||||
|
||||
/* A U X I L L A R Y T Y P E I N F O R M A T I O N */
|
||||
|
||||
/*
|
||||
* Type Information Record
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned fBitfield : 1; /* set if bit width is specified */
|
||||
unsigned continued : 1; /* indicates additional TQ info in next AUX */
|
||||
unsigned bt : 6; /* basic type */
|
||||
unsigned tq4 : 4;
|
||||
unsigned tq5 : 4;
|
||||
/* ---- 16 bit boundary ---- */
|
||||
unsigned tq0 : 4;
|
||||
unsigned tq1 : 4; /* 6 type qualifiers - tqPtr, etc. */
|
||||
unsigned tq2 : 4;
|
||||
unsigned tq3 : 4;
|
||||
} TIR, *pTIR;
|
||||
#define cbTIR sizeof(TIR)
|
||||
#define tiNil ((pTIR)0)
|
||||
#define itqMax 6
|
||||
|
||||
/*
|
||||
* Relative symbol record
|
||||
*
|
||||
* If the rfd field is 4095, the index field indexes into the global symbol
|
||||
* table.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned rfd : 12; /* index into the file indirect table */
|
||||
unsigned index : 20; /* index int sym/aux/iss tables */
|
||||
} RNDXR, *pRNDXR;
|
||||
#define cbRNDXR sizeof(RNDXR)
|
||||
#define rndxNil ((pRNDXR)0)
|
||||
|
||||
/* dense numbers or sometimes called block numbers are stored in this type,
|
||||
* a rfd of 0xffffffff is an index into the global table.
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned long rfd; /* index into the file table */
|
||||
unsigned long index; /* index int sym/aux/iss tables */
|
||||
} DNR, *pDNR;
|
||||
#define cbDNR sizeof(DNR)
|
||||
#define dnNil ((pDNR)0)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Auxillary information occurs only if needed.
|
||||
* It ALWAYS occurs in this order when present.
|
||||
|
||||
isymMac used by stProc only
|
||||
TIR type info
|
||||
TIR additional TQ info (if first TIR was not enough)
|
||||
rndx if (bt == btStruct,btUnion,btEnum,btSet,btRange,
|
||||
btTypedef):
|
||||
rsym.index == iaux for btSet or btRange
|
||||
else rsym.index == isym
|
||||
dimLow btRange, btSet
|
||||
dimMac btRange, btSet
|
||||
rndx0 As many as there are tq arrays
|
||||
dimLow0
|
||||
dimHigh0
|
||||
...
|
||||
rndxMax-1
|
||||
dimLowMax-1
|
||||
dimHighMax-1
|
||||
width in bits if (bit field), width in bits.
|
||||
*/
|
||||
#define cAuxMax (6 + (idimMax*3))
|
||||
|
||||
/* a union of all possible info in the AUX universe */
|
||||
typedef union {
|
||||
TIR ti; /* type information record */
|
||||
RNDXR rndx; /* relative index into symbol table */
|
||||
long dnLow; /* low dimension */
|
||||
long dnHigh; /* high dimension */
|
||||
long isym; /* symbol table index (end of proc) */
|
||||
long iss; /* index into string space (not used) */
|
||||
long width; /* width for non-default sized struc fields */
|
||||
long count; /* count of ranges for variant arm */
|
||||
} AUXU, *pAUXU;
|
||||
#define cbAUXU sizeof(AUXU)
|
||||
#define auxNil ((pAUXU)0)
|
||||
#define iauxNil -1
|
||||
|
||||
|
||||
/*
|
||||
* Optimization symbols
|
||||
*
|
||||
* Optimization symbols contain some overlap information with the normal
|
||||
* symbol table. In particular, the proc information
|
||||
* is somewhat redundant but necessary to easily find the other information
|
||||
* present.
|
||||
*
|
||||
* All of the offsets are relative to the beginning of the last otProc
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned ot: 8; /* optimization type */
|
||||
unsigned value: 24; /* address where we are moving it to */
|
||||
RNDXR rndx; /* points to a symbol or opt entry */
|
||||
unsigned long offset; /* relative offset this occured */
|
||||
} OPTR, *pOPTR;
|
||||
#define optNil ((pOPTR) 0)
|
||||
#define cbOPTR sizeof(OPTR)
|
||||
#define ioptNil -1
|
||||
|
||||
/*
|
||||
* File Indirect
|
||||
*
|
||||
* When a symbol is referenced across files the following procedure is used:
|
||||
* 1) use the file index to get the File indirect entry.
|
||||
* 2) use the file indirect entry to get the File descriptor.
|
||||
* 3) add the sym index to the base of that file's sym table
|
||||
*
|
||||
*/
|
||||
|
||||
typedef long RFDT, *pRFDT;
|
||||
#define cbRFDT sizeof(RFDT)
|
||||
#define rfdNil -1
|
||||
|
||||
/*
|
||||
* The file indirect table in the mips loader is known as an array of FITs.
|
||||
* This is done to keep the code in the loader readable in the area where
|
||||
* these tables are merged. Note this is only a name change.
|
||||
*/
|
||||
typedef long FIT, *pFIT;
|
||||
#define cbFIT sizeof(FIT)
|
||||
#define ifiNil -1
|
||||
#define fiNil ((pFIT) 0)
|
||||
|
||||
#ifdef _LANGUAGE_PASCAL
|
||||
#define ifdNil -1
|
||||
#define ilnNil -1
|
||||
#define ipdNil -1
|
||||
#define ilineNil -1
|
||||
#define isymNil -1
|
||||
#define indexNil 16#fffff
|
||||
#define issNil -1
|
||||
#define issNull 0
|
||||
#define itqMax 6
|
||||
#define iauxNil -1
|
||||
#define ioptNil -1
|
||||
#define rfdNil -1
|
||||
#define ifiNil -1
|
||||
#endif /* _LANGUAGE_PASCAL */
|
||||
|
||||
|
||||
/* Dense numbers
|
||||
*
|
||||
* Rather than use file index, symbol index pairs to represent symbols
|
||||
* and globals, we use dense number so that they can be easily embeded
|
||||
* in intermediate code and the programs that process them can
|
||||
* use direct access tabls instead of hash table (which would be
|
||||
* necesary otherwise because of the sparse name space caused by
|
||||
* file index, symbol index pairs. Dense number are represented
|
||||
* by RNDXRs.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following table defines the meaning of each SYM field as
|
||||
* a function of the "st". (scD/B == scData OR scBss)
|
||||
*
|
||||
* Note: the value "isymMac" is used by symbols that have the concept
|
||||
* of enclosing a block of related information. This value is the
|
||||
* isym of the first symbol AFTER the end associated with the primary
|
||||
* symbol. For example if a procedure was at isym==90 and had an
|
||||
* isymMac==155, the associated end would be at isym==154, and the
|
||||
* symbol at 155 would probably (although not necessarily) be the
|
||||
* symbol for the next procedure. This allows rapid skipping over
|
||||
* internal information of various sorts. "stEnd"s ALWAYS have the
|
||||
* isym of the primary symbol that started the block.
|
||||
*
|
||||
|
||||
ST SC VALUE INDEX
|
||||
-------- ------ -------- ------
|
||||
stFile scText address isymMac
|
||||
stLabel scText address ---
|
||||
stGlobal scD/B address iaux
|
||||
stStatic scD/B address iaux
|
||||
stParam scAbs offset iaux
|
||||
stLocal scAbs offset iaux
|
||||
stProc scText address iaux (isymMac is first AUX)
|
||||
stStaticProc scText address iaux (isymMac is first AUX)
|
||||
|
||||
stMember scNil ordinal --- (if member of enum)
|
||||
(mipsread thinks the case below has a bit, not byte, offset.)
|
||||
stMember scNil byte offset iaux (if member of struct/union)
|
||||
stMember scBits bit offset iaux (bit field spec)
|
||||
|
||||
stBlock scText address isymMac (text block)
|
||||
(the code seems to think that rather than scNil, we see scInfo for
|
||||
the two cases below.)
|
||||
stBlock scNil cb isymMac (struct/union member define)
|
||||
stBlock scNil cMembers isymMac (enum member define)
|
||||
|
||||
(New types added by SGI to simplify things:)
|
||||
stStruct scInfo cb isymMac (struct type define)
|
||||
stUnion scInfo cb isymMac (union type define)
|
||||
stEnum scInfo cMembers isymMac (enum type define)
|
||||
|
||||
stEnd scText address isymStart
|
||||
stEnd scNil ------- isymStart (struct/union/enum)
|
||||
|
||||
stTypedef scNil ------- iaux
|
||||
stRegReloc sc??? value old register number
|
||||
stForward sc??? new address isym to original symbol
|
||||
|
||||
stConstant scInfo value --- (scalar)
|
||||
stConstant scInfo iss --- (complex, e.g. string)
|
||||
|
||||
*
|
||||
*/
|
||||
#endif
|
||||
@@ -1,177 +0,0 @@
|
||||
/* Declarations of constants for internal format of MIPS ECOFF symbols.
|
||||
Originally contributed by MIPS Computer Systems and Third Eye Software.
|
||||
Changes contributed by Cygnus Support are in the public domain.
|
||||
|
||||
This file is just aggregated with the files that make up the GNU
|
||||
release; it is not considered part of GAS, GDB, or other GNU
|
||||
programs. */
|
||||
|
||||
/*
|
||||
* |-----------------------------------------------------------|
|
||||
* | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.|
|
||||
* | MIPS Computer Systems, Inc. grants reproduction and use |
|
||||
* | rights to all parties, PROVIDED that this comment is |
|
||||
* | maintained in the copy. |
|
||||
* |-----------------------------------------------------------|
|
||||
*/
|
||||
|
||||
/* (C) Copyright 1984 by Third Eye Software, Inc.
|
||||
*
|
||||
* Third Eye Software, Inc. grants reproduction and use rights to
|
||||
* all parties, PROVIDED that this comment is maintained in the copy.
|
||||
*
|
||||
* Third Eye makes no claims about the applicability of this
|
||||
* symbol table to a particular use.
|
||||
*/
|
||||
|
||||
/* glevels for field in FDR */
|
||||
#define GLEVEL_0 2
|
||||
#define GLEVEL_1 1
|
||||
#define GLEVEL_2 0 /* for upward compat reasons. */
|
||||
#define GLEVEL_3 3
|
||||
|
||||
/* magic number fo symheader */
|
||||
#define magicSym 0x7009
|
||||
/* The Alpha uses this value instead, for some reason. */
|
||||
#define magicSym2 0x1992
|
||||
|
||||
/* Language codes */
|
||||
#define langC 0
|
||||
#define langPascal 1
|
||||
#define langFortran 2
|
||||
#define langAssembler 3 /* one Assembley inst might map to many mach */
|
||||
#define langMachine 4
|
||||
#define langNil 5
|
||||
#define langAda 6
|
||||
#define langPl1 7
|
||||
#define langCobol 8
|
||||
#define langStdc 9 /* FIXME: Collides with SGI langCplusplus */
|
||||
#define langCplusplus 9 /* FIXME: Collides with langStdc */
|
||||
#define langCplusplusV2 10 /* SGI addition */
|
||||
#define langMax 11 /* maximum allowed 32 -- 5 bits */
|
||||
|
||||
/* The following are value definitions for the fields in the SYMR */
|
||||
|
||||
/*
|
||||
* Storage Classes
|
||||
*/
|
||||
|
||||
#define scNil 0
|
||||
#define scText 1 /* text symbol */
|
||||
#define scData 2 /* initialized data symbol */
|
||||
#define scBss 3 /* un-initialized data symbol */
|
||||
#define scRegister 4 /* value of symbol is register number */
|
||||
#define scAbs 5 /* value of symbol is absolute */
|
||||
#define scUndefined 6 /* who knows? */
|
||||
#define scCdbLocal 7 /* variable's value is IN se->va.?? */
|
||||
#define scBits 8 /* this is a bit field */
|
||||
#define scCdbSystem 9 /* variable's value is IN CDB's address space */
|
||||
#define scDbx 9 /* overlap dbx internal use */
|
||||
#define scRegImage 10 /* register value saved on stack */
|
||||
#define scInfo 11 /* symbol contains debugger information */
|
||||
#define scUserStruct 12 /* address in struct user for current process */
|
||||
#define scSData 13 /* load time only small data */
|
||||
#define scSBss 14 /* load time only small common */
|
||||
#define scRData 15 /* load time only read only data */
|
||||
#define scVar 16 /* Var parameter (fortran,pascal) */
|
||||
#define scCommon 17 /* common variable */
|
||||
#define scSCommon 18 /* small common */
|
||||
#define scVarRegister 19 /* Var parameter in a register */
|
||||
#define scVariant 20 /* Variant record */
|
||||
#define scSUndefined 21 /* small undefined(external) data */
|
||||
#define scInit 22 /* .init section symbol */
|
||||
#define scBasedVar 23 /* Fortran or PL/1 ptr based var */
|
||||
#define scXData 24 /* exception handling data */
|
||||
#define scPData 25 /* Procedure section */
|
||||
#define scFini 26 /* .fini section */
|
||||
#define scRConst 27 /* .rconst section */
|
||||
#define scMax 32
|
||||
|
||||
|
||||
/*
|
||||
* Symbol Types
|
||||
*/
|
||||
|
||||
#define stNil 0 /* Nuthin' special */
|
||||
#define stGlobal 1 /* external symbol */
|
||||
#define stStatic 2 /* static */
|
||||
#define stParam 3 /* procedure argument */
|
||||
#define stLocal 4 /* local variable */
|
||||
#define stLabel 5 /* label */
|
||||
#define stProc 6 /* " " Procedure */
|
||||
#define stBlock 7 /* beginnning of block */
|
||||
#define stEnd 8 /* end (of anything) */
|
||||
#define stMember 9 /* member (of anything - struct/union/enum */
|
||||
#define stTypedef 10 /* type definition */
|
||||
#define stFile 11 /* file name */
|
||||
#define stRegReloc 12 /* register relocation */
|
||||
#define stForward 13 /* forwarding address */
|
||||
#define stStaticProc 14 /* load time only static procs */
|
||||
#define stConstant 15 /* const */
|
||||
#define stStaParam 16 /* Fortran static parameters */
|
||||
/* These new symbol types have been recently added to SGI machines. */
|
||||
#define stStruct 26 /* Beginning of block defining a struct type */
|
||||
#define stUnion 27 /* Beginning of block defining a union type */
|
||||
#define stEnum 28 /* Beginning of block defining an enum type */
|
||||
#define stIndirect 34 /* Indirect type specification */
|
||||
/* Pseudo-symbols - internal to debugger */
|
||||
#define stStr 60 /* string */
|
||||
#define stNumber 61 /* pure number (ie. 4 NOR 2+2) */
|
||||
#define stExpr 62 /* 2+2 vs. 4 */
|
||||
#define stType 63 /* post-coersion SER */
|
||||
#define stMax 64
|
||||
|
||||
/* definitions for fields in TIR */
|
||||
|
||||
/* type qualifiers for ti.tq0 -> ti.(itqMax-1) */
|
||||
#define tqNil 0 /* bt is what you see */
|
||||
#define tqPtr 1 /* pointer */
|
||||
#define tqProc 2 /* procedure */
|
||||
#define tqArray 3 /* duh */
|
||||
#define tqFar 4 /* longer addressing - 8086/8 land */
|
||||
#define tqVol 5 /* volatile */
|
||||
#define tqConst 6 /* const */
|
||||
#define tqMax 8
|
||||
|
||||
/* basic types as seen in ti.bt */
|
||||
#define btNil 0 /* undefined (also, enum members) */
|
||||
#define btAdr 1 /* address - integer same size as pointer */
|
||||
#define btChar 2 /* character */
|
||||
#define btUChar 3 /* unsigned character */
|
||||
#define btShort 4 /* short */
|
||||
#define btUShort 5 /* unsigned short */
|
||||
#define btInt 6 /* int */
|
||||
#define btUInt 7 /* unsigned int */
|
||||
#define btLong 8 /* long */
|
||||
#define btULong 9 /* unsigned long */
|
||||
#define btFloat 10 /* float (real) */
|
||||
#define btDouble 11 /* Double (real) */
|
||||
#define btStruct 12 /* Structure (Record) */
|
||||
#define btUnion 13 /* Union (variant) */
|
||||
#define btEnum 14 /* Enumerated */
|
||||
#define btTypedef 15 /* defined via a typedef, isymRef points */
|
||||
#define btRange 16 /* subrange of int */
|
||||
#define btSet 17 /* pascal sets */
|
||||
#define btComplex 18 /* fortran complex */
|
||||
#define btDComplex 19 /* fortran double complex */
|
||||
#define btIndirect 20 /* forward or unnamed typedef */
|
||||
#define btFixedDec 21 /* Fixed Decimal */
|
||||
#define btFloatDec 22 /* Float Decimal */
|
||||
#define btString 23 /* Varying Length Character String */
|
||||
#define btBit 24 /* Aligned Bit String */
|
||||
#define btPicture 25 /* Picture */
|
||||
#define btVoid 26 /* void */
|
||||
#define btLongLong 27 /* long long */
|
||||
#define btULongLong 28 /* unsigned long long */
|
||||
#define btMax 64
|
||||
|
||||
#if (_MFG == _MIPS)
|
||||
/* optimization type codes */
|
||||
#define otNil 0
|
||||
#define otReg 1 /* move var to reg */
|
||||
#define otBlock 2 /* begin basic block */
|
||||
#define otProc 3 /* procedure */
|
||||
#define otInline 4 /* inline procedure */
|
||||
#define otEnd 5 /* whatever you started */
|
||||
#define otMax 6 /* KEEP UP TO DATE */
|
||||
#endif /* (_MFG == _MIPS) */
|
||||
@@ -1,473 +0,0 @@
|
||||
/* COFF information for TI COFF support. Definitions in this file should be
|
||||
customized in a target-specific file, and then this file included (see
|
||||
tic54x.h for an example).
|
||||
|
||||
Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
#ifndef COFF_TI_H
|
||||
#define COFF_TI_H
|
||||
|
||||
/* Note "coff/external.h is not used because TI adds extra fields to the structures. */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr
|
||||
{
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
char f_target_id[2]; /* magic no. (TI COFF-specific) */
|
||||
};
|
||||
|
||||
/* COFF0 has magic number in f_magic, and omits f_target_id from the file
|
||||
header; for later versions, f_magic is 0xC1 for COFF1 and 0xC2 for COFF2
|
||||
and the target-specific magic number is found in f_target_id */
|
||||
|
||||
#define TICOFF0MAGIC TI_TARGET_ID
|
||||
#define TICOFF1MAGIC 0x00C1
|
||||
#define TICOFF2MAGIC 0x00C2
|
||||
#define TICOFF_AOUT_MAGIC 0x0108 /* magic number in optional header */
|
||||
#define TICOFF 1 /* customize coffcode.h */
|
||||
|
||||
/* The target_id field changes depending on the particular CPU target */
|
||||
/* for COFF0, the target id appeared in f_magic, where COFFX magic is now */
|
||||
#ifndef TI_TARGET_ID
|
||||
#error "TI_TARGET_ID needs to be defined for your CPU"
|
||||
#endif
|
||||
|
||||
/* Which bfd_arch to use... */
|
||||
#ifndef TICOFF_TARGET_ARCH
|
||||
#error "TICOFF_TARGET_ARCH needs to be defined for your CPU"
|
||||
#endif
|
||||
|
||||
#ifndef TICOFF_TARGET_MACHINE_GET
|
||||
#define TICOFF_TARGET_MACHINE_GET(FLAGS) 0
|
||||
#endif
|
||||
|
||||
#ifndef TICOFF_TARGET_MACHINE_SET
|
||||
#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE)
|
||||
#endif
|
||||
|
||||
/* Default to COFF2 for file output */
|
||||
#ifndef TICOFF_DEFAULT_MAGIC
|
||||
#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC
|
||||
#endif
|
||||
|
||||
/* This value is made available in the rare case where a bfd is unavailable */
|
||||
#ifndef OCTETS_PER_BYTE_POWER
|
||||
#error "OCTETS_PER_BYTE_POWER not defined for this CPU"
|
||||
#else
|
||||
#define OCTETS_PER_BYTE (1<<OCTETS_PER_BYTE_POWER)
|
||||
#endif
|
||||
|
||||
/* default alignment is on a byte (not octet!) boundary */
|
||||
#ifndef COFF_DEFAULT_SECTION_ALIGNMENT_POWER
|
||||
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER 0
|
||||
#endif
|
||||
|
||||
/* TI COFF encodes the section alignment in the section header flags */
|
||||
#define COFF_ALIGN_IN_SECTION_HEADER 1
|
||||
#define COFF_ALIGN_IN_S_FLAGS 1
|
||||
/* requires a power-of-two argument */
|
||||
#define COFF_ENCODE_ALIGNMENT(S,X) ((S).s_flags |= (((unsigned)(X)&0xF)<<8))
|
||||
/* result is a power of two */
|
||||
#define COFF_DECODE_ALIGNMENT(X) (((X)>>8)&0xF)
|
||||
|
||||
#define COFF0_P(ABFD) (bfd_coff_filhsz(ABFD) == FILHSZ_V0)
|
||||
#define COFF2_P(ABFD) (bfd_coff_scnhsz(ABFD) != SCNHSZ_V01)
|
||||
|
||||
#define COFF0_BADMAG(x) ((x).f_magic != TICOFF0MAGIC)
|
||||
#define COFF1_BADMAG(x) ((x).f_magic != TICOFF1MAGIC || (x).f_target_id != TI_TARGET_ID)
|
||||
#define COFF2_BADMAG(x) ((x).f_magic != TICOFF2MAGIC || (x).f_target_id != TI_TARGET_ID)
|
||||
|
||||
/* we need to read/write an extra field in the coff file header */
|
||||
#ifndef COFF_ADJUST_FILEHDR_IN_POST
|
||||
#define COFF_ADJUST_FILEHDR_IN_POST(abfd, src, dst) \
|
||||
do \
|
||||
{ \
|
||||
((struct internal_filehdr *)(dst))->f_target_id = \
|
||||
H_GET_16 (abfd, ((FILHDR *)(src))->f_target_id); \
|
||||
} \
|
||||
while (0)
|
||||
#endif
|
||||
|
||||
#ifndef COFF_ADJUST_FILEHDR_OUT_POST
|
||||
#define COFF_ADJUST_FILEHDR_OUT_POST(abfd, src, dst) \
|
||||
do \
|
||||
{ \
|
||||
H_PUT_16 (abfd, ((struct internal_filehdr *)(src))->f_target_id, \
|
||||
((FILHDR *)(dst))->f_target_id); \
|
||||
} \
|
||||
while (0)
|
||||
#endif
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 22
|
||||
#define FILHSZ_V0 20 /* COFF0 omits target_id field */
|
||||
|
||||
/* File header flags */
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_VERS (0x0010) /* TMS320C4x code */
|
||||
/* F_LSYMS needs to be redefined in your source file */
|
||||
#define F_LSYMS_TICOFF (0x0010) /* normal COFF is 0x8 */
|
||||
|
||||
#define F_10 0x00 /* file built for TMS320C1x devices */
|
||||
#define F_20 0x10 /* file built for TMS320C2x devices */
|
||||
#define F_25 0x20 /* file built for TMS320C2x/C5x devices */
|
||||
#define F_LENDIAN 0x0100 /* 16 bits/word, LSB first */
|
||||
#define F_SYMMERGE 0x1000 /* duplicate symbols were removed */
|
||||
|
||||
/********************** OPTIONAL HEADER **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file (0x108) */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
|
||||
#define AOUTHDRSZ 28
|
||||
#define AOUTSZ 28
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
/* COFF0, COFF1 */
|
||||
struct external_scnhdr_v01 {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size (in WORDS) */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[2]; /* flags */
|
||||
char s_reserved[1]; /* reserved */
|
||||
char s_page[1]; /* section page number (LOAD) */
|
||||
};
|
||||
|
||||
/* COFF2 */
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size (in WORDS) */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[4]; /* number of relocation entries */
|
||||
char s_nlnno[4]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
char s_reserved[2]; /* reserved */
|
||||
char s_page[2]; /* section page number (LOAD) */
|
||||
};
|
||||
|
||||
/*
|
||||
* Special section flags
|
||||
*/
|
||||
|
||||
/* TI COFF defines these flags;
|
||||
STYP_CLINK: the section should be excluded from the final
|
||||
linker output if there are no references found to any symbol in the section
|
||||
STYP_BLOCK: the section should be blocked, i.e. if the section would cross
|
||||
a page boundary, it is started at a page boundary instead.
|
||||
TI COFF puts the section alignment power of two in the section flags
|
||||
e.g. 2**N is alignment, flags |= (N & 0xF) << 8
|
||||
*/
|
||||
#define STYP_CLINK (0x4000)
|
||||
#define STYP_BLOCK (0x1000)
|
||||
#define STYP_ALIGN (0x0F00) /* TI COFF stores section alignment here */
|
||||
|
||||
#define SCNHDR_V01 struct external_scnhdr_v01
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ_V01 40 /* for v0 and v1 */
|
||||
#define SCNHSZ 48
|
||||
|
||||
/* COFF2 changes the offsets and sizes of these fields
|
||||
Assume we're dealing with the COFF2 scnhdr structure, and adjust
|
||||
accordingly
|
||||
*/
|
||||
#define GET_SCNHDR_NRELOC(ABFD, LOC) \
|
||||
(COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, LOC))
|
||||
#define PUT_SCNHDR_NRELOC(ABFD, VAL, LOC) \
|
||||
(COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, LOC))
|
||||
#define GET_SCNHDR_NLNNO(ABFD, LOC) \
|
||||
(COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 2))
|
||||
#define PUT_SCNHDR_NLNNO(ABFD, VAL, LOC) \
|
||||
(COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 2))
|
||||
#define GET_SCNHDR_FLAGS(ABFD, LOC) \
|
||||
(COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 4))
|
||||
#define PUT_SCNHDR_FLAGS(ABFD, VAL, LOC) \
|
||||
(COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 4))
|
||||
#define GET_SCNHDR_PAGE(ABFD, LOC) \
|
||||
(COFF2_P (ABFD) ? H_GET_16 (ABFD, LOC) : (unsigned) H_GET_8 (ABFD, (LOC) - 7))
|
||||
/* on output, make sure that the "reserved" field is zero */
|
||||
#define PUT_SCNHDR_PAGE(ABFD, VAL, LOC) \
|
||||
(COFF2_P (ABFD) \
|
||||
? H_PUT_16 (ABFD, VAL, LOC) \
|
||||
: H_PUT_8 (ABFD, VAL, (LOC) - 7), H_PUT_8 (ABFD, 0, (LOC) - 8))
|
||||
|
||||
/* TI COFF stores section size as number of bytes (address units, not octets),
|
||||
so adjust to be number of octets, which is what BFD expects */
|
||||
#define GET_SCNHDR_SIZE(ABFD, SZP) \
|
||||
(H_GET_32 (ABFD, SZP) * bfd_octets_per_byte (ABFD))
|
||||
#define PUT_SCNHDR_SIZE(ABFD, SZ, SZP) \
|
||||
H_PUT_32 (ABFD, (SZ) / bfd_octets_per_byte (ABFD), SZP)
|
||||
|
||||
#define COFF_ADJUST_SCNHDR_IN_POST(ABFD, EXT, INT) \
|
||||
do \
|
||||
{ \
|
||||
((struct internal_scnhdr *)(INT))->s_page = \
|
||||
GET_SCNHDR_PAGE (ABFD, ((SCNHDR *)(EXT))->s_page); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* The line number and reloc overflow checking in coff_swap_scnhdr_out in
|
||||
coffswap.h doesn't use PUT_X for s_nlnno and s_nreloc.
|
||||
Due to different sized v0/v1/v2 section headers, we have to re-write these
|
||||
fields.
|
||||
*/
|
||||
#define COFF_ADJUST_SCNHDR_OUT_POST(ABFD, INT, EXT) \
|
||||
do \
|
||||
{ \
|
||||
PUT_SCNHDR_NLNNO (ABFD, ((struct internal_scnhdr *)(INT))->s_nlnno, \
|
||||
((SCNHDR *)(EXT))->s_nlnno); \
|
||||
PUT_SCNHDR_NRELOC (ABFD, ((struct internal_scnhdr *)(INT))->s_nreloc,\
|
||||
((SCNHDR *)(EXT))->s_nreloc); \
|
||||
PUT_SCNHDR_FLAGS (ABFD, ((struct internal_scnhdr *)(INT))->s_flags, \
|
||||
((SCNHDR *)(EXT))->s_flags); \
|
||||
PUT_SCNHDR_PAGE (ABFD, ((struct internal_scnhdr *)(INT))->s_page, \
|
||||
((SCNHDR *)(EXT))->s_page); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _CINIT ".cinit" /* initialized C data */
|
||||
#define _SCONST ".const" /* constants */
|
||||
#define _SWITCH ".switch" /* switch tables */
|
||||
#define _STACK ".stack" /* C stack */
|
||||
#define _SYSMEM ".sysmem" /* used for malloc et al. syscalls */
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
/* NOTE: this is what a local label looks like in assembly source; what it
|
||||
looks like in COFF output is undefined */
|
||||
#define TICOFF_LOCAL_LABEL_P(NAME) \
|
||||
((NAME[0] == '$' && NAME[1] >= '0' && NAME[1] <= '9' && NAME[2] == '\0') \
|
||||
|| NAME[strlen(NAME)-1] == '?')
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
/* section lengths are in target bytes (not host bytes) */
|
||||
#define GET_SCN_SCNLEN(ABFD, EXT) \
|
||||
(H_GET_32 (ABFD, (EXT)->x_scn.x_scnlen) * bfd_octets_per_byte (ABFD))
|
||||
#define PUT_SCN_SCNLEN(ABFD, INT, EXT) \
|
||||
H_PUT_32 (ABFD, (INT) / bfd_octets_per_byte (ABFD), (EXT)->x_scn.x_scnlen)
|
||||
|
||||
/* lnsz size is in bits in COFF file, in bytes in BFD */
|
||||
#define GET_LNSZ_SIZE(abfd, ext) \
|
||||
(H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (class != C_FIELD ? 8 : 1))
|
||||
|
||||
#define PUT_LNSZ_SIZE(abfd, in, ext) \
|
||||
H_PUT_16 (abfd, ((class != C_FIELD) ? (in) * 8 : (in)), \
|
||||
ext->x_sym.x_misc.x_lnsz.x_size)
|
||||
|
||||
/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes
|
||||
Also put the load page flag of the section into the symbol value if it's an
|
||||
address. */
|
||||
#ifndef NEEDS_PAGE
|
||||
#define NEEDS_PAGE(X) 0
|
||||
#define PAGE_MASK 0
|
||||
#endif
|
||||
#define COFF_ADJUST_SYM_IN_POST(ABFD, EXT, INT) \
|
||||
do \
|
||||
{ \
|
||||
struct internal_syment *dst = (struct internal_syment *)(INT); \
|
||||
if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU) \
|
||||
dst->n_value /= 8; \
|
||||
else if (NEEDS_PAGE (dst->n_sclass)) { \
|
||||
asection *scn = coff_section_from_bfd_index (abfd, dst->n_scnum); \
|
||||
dst->n_value |= (scn->lma & PAGE_MASK); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define COFF_ADJUST_SYM_OUT_POST(ABFD, INT, EXT) \
|
||||
do \
|
||||
{ \
|
||||
struct internal_syment *src = (struct internal_syment *)(INT); \
|
||||
SYMENT *dst = (SYMENT *)(EXT); \
|
||||
if (src->n_sclass == C_MOU || src->n_sclass == C_MOS) \
|
||||
H_PUT_32 (abfd, src->n_value * 8, dst->e_value); \
|
||||
else if (NEEDS_PAGE (src->n_sclass)) { \
|
||||
H_PUT_32 (abfd, src->n_value &= ~PAGE_MASK, dst->e_value); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Detect section-relative absolute symbols so they get flagged with a sym
|
||||
index of -1.
|
||||
*/
|
||||
#define SECTION_RELATIVE_ABSOLUTE_SYMBOL_P(RELOC, SECT) \
|
||||
((*(RELOC)->sym_ptr_ptr)->section->output_section == (SECT) \
|
||||
&& (RELOC)->howto->name[0] == 'A')
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc_v0
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[2];
|
||||
char r_reserved[2];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_reserved[2]; /* extended pmad byte for COFF2 */
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ_V0 10 /* FIXME -- coffcode.h needs fixing */
|
||||
#define RELSZ 12 /* for COFF1/2 */
|
||||
|
||||
/* various relocation types. */
|
||||
#define R_ABS 0x0000 /* no relocation */
|
||||
#define R_REL13 0x002A /* 13-bit direct reference (???) */
|
||||
#define R_PARTLS7 0x0028 /* 7 LSBs of an address */
|
||||
#define R_PARTMS9 0x0029 /* 9MSBs of an address */
|
||||
#define R_EXTWORD 0x002B /* 23-bit direct reference */
|
||||
#define R_EXTWORD16 0x002C /* 16-bit direct reference to 23-bit addr*/
|
||||
#define R_EXTWORDMS7 0x002D /* upper 7 bits of 23-bit address */
|
||||
|
||||
#endif /* COFF_TI_H */
|
||||
@@ -1,50 +0,0 @@
|
||||
/* coff information for Texas Instruments TMS320C3X
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define L_LNNO_SIZE 4
|
||||
#include "coff/external.h"
|
||||
|
||||
#define TIC30MAGIC 0xC000
|
||||
|
||||
#define TIC30BADMAG(x) (((x).f_magic != TIC30MAGIC))
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the z8k don't have room in the instruction for the entire
|
||||
offset - eg with segments */
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
/* TMS320C30 relocation types. */
|
||||
|
||||
#define R_TIC30_ABS16 0x100 /* 16 bit absolute. */
|
||||
#define R_TIC30_ABS24 0x101 /* 24 bit absolute. */
|
||||
#define R_TIC30_ABS32 0x102 /* 32 bit absolute. */
|
||||
#define R_TIC30_LDP 0x103 /* LDP bits 23-16 to 7-0. */
|
||||
#define R_TIC30_PC16 0x104 /* 16 bit pc relative. */
|
||||
@@ -1,46 +0,0 @@
|
||||
/* TI COFF information for Texas Instruments TMS320C4X/C3X.
|
||||
This file customizes the settings in coff/ti.h.
|
||||
|
||||
Copyright 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef COFF_TIC4X_H
|
||||
#define COFF_TIC4X_H
|
||||
|
||||
#define TIC4X_TARGET_ID 0x0093
|
||||
/* Octets per byte, as a power of two. */
|
||||
#define TI_TARGET_ID TIC4X_TARGET_ID
|
||||
#define OCTETS_PER_BYTE_POWER 2
|
||||
/* Add to howto to get absolute/sect-relative version. */
|
||||
#define HOWTO_BANK 6
|
||||
#define TICOFF_TARGET_ARCH bfd_arch_tic4x
|
||||
/* We use COFF2. */
|
||||
#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC
|
||||
|
||||
#define TICOFF_TARGET_MACHINE_GET(FLAGS) \
|
||||
(((FLAGS) & F_VERS) ? bfd_mach_tic4x : bfd_mach_tic3x)
|
||||
|
||||
#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE) \
|
||||
do \
|
||||
{ \
|
||||
if ((MACHINE) == bfd_mach_tic4x) \
|
||||
*(FLAGSP) |= F_VERS; \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#include "coff/ti.h"
|
||||
|
||||
#endif /* COFF_TIC4X_H */
|
||||
@@ -1,59 +0,0 @@
|
||||
/* TI COFF information for Texas Instruments TMS320C54X.
|
||||
This file customizes the settings in coff/ti.h.
|
||||
|
||||
Copyright 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef COFF_TIC54X_H
|
||||
#define COFF_TIC54X_H
|
||||
|
||||
#define TIC54X_TARGET_ID 0x98
|
||||
#define TIC54XALGMAGIC 0x009B /* c54x algebraic assembler output */
|
||||
#define TIC5X_TARGET_ID 0x92
|
||||
#define TI_TARGET_ID TIC54X_TARGET_ID
|
||||
#define OCTETS_PER_BYTE_POWER 1 /* octets per byte, as a power of two */
|
||||
#define HOWTO_BANK 6 /* add to howto to get absolute/sect-relative version */
|
||||
#define TICOFF_TARGET_ARCH bfd_arch_tic54x
|
||||
#define TICOFF_DEFAULT_MAGIC TICOFF1MAGIC /* we use COFF1 for compatibility */
|
||||
|
||||
/* Page macros
|
||||
|
||||
The first GDB port requires flags in its remote memory access commands to
|
||||
distinguish between data/prog space. Hopefully we can make this go away
|
||||
eventually. Stuff the page in the upper bits of a 32-bit address, since
|
||||
the c5x family only uses 16 or 23 bits.
|
||||
|
||||
c2x, c5x and most c54x devices have 16-bit addresses, but the c548 has
|
||||
23-bit program addresses. Make sure the page flags don't interfere.
|
||||
These flags are used by GDB to identify the destination page for
|
||||
addresses.
|
||||
*/
|
||||
|
||||
/* Recognized load pages (by common convention). */
|
||||
#define PG_PROG 0x0 /* PROG page */
|
||||
#define PG_DATA 0x1 /* DATA page */
|
||||
#define PG_IO 0x2 /* I/O page */
|
||||
|
||||
/** Indicate whether the given storage class requires a page flag. */
|
||||
#define NEEDS_PAGE(X) ((X)==C_EXT)
|
||||
#define PAGE_MASK 0xFF000000
|
||||
#define ADDR_MASK 0x00FFFFFF
|
||||
#define PG_TO_FLAG(p) (((unsigned long)(p) & 0xFF) << 24)
|
||||
#define FLAG_TO_PG(f) (((f) >> 24) & 0xFF)
|
||||
|
||||
#include "coff/ti.h"
|
||||
|
||||
#endif /* COFF_TIC54X_H */
|
||||
@@ -1,122 +0,0 @@
|
||||
/* coff information for TI TMS320C80 (MVP)
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define DO_NOT_DEFINE_FILHDR
|
||||
#define DO_NOT_DEFINE_SCNHDR
|
||||
#define L_LNNO_SIZE 2
|
||||
#include "coff/external.h"
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr
|
||||
{
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
char f_target_id[2];/* target id (TIc80 specific) */
|
||||
};
|
||||
|
||||
#define TIC80_ARCH_MAGIC 0x0C1 /* Goes in the file header magic number field */
|
||||
#define TIC80_TARGET_ID 0x95 /* Goes in the target id field */
|
||||
|
||||
#define TIC80BADMAG(x) ((x).f_magic != TIC80_ARCH_MAGIC)
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 22
|
||||
|
||||
#define TIC80_AOUTHDR_MAGIC 0x108 /* Goes in the optional file header magic number field */
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
struct external_scnhdr
|
||||
{
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[2]; /* flags */
|
||||
char s_reserved[1]; /* reserved (TIc80 specific) */
|
||||
char s_mempage[1]; /* memory page number (TIc80) */
|
||||
};
|
||||
|
||||
/* Names of "special" sections. */
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _CINIT ".cinit"
|
||||
#define _CONST ".const"
|
||||
#define _SWITCH ".switch"
|
||||
#define _STACK ".stack"
|
||||
#define _SYSMEM ".sysmem"
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/* FIXME - need to correlate external_auxent with
|
||||
TIc80 Code Generation Tools User's Guide, CG:A-25 */
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the h8 don't have room in the instruction for the entire
|
||||
offset - eg the strange jump and high page addressing modes. */
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_reserved[2];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 12
|
||||
|
||||
/* TIc80 relocation types. */
|
||||
|
||||
#define R_ABS 0x00 /* Absolute address - no relocation */
|
||||
#define R_RELLONGX 0x11 /* PP: 32 bits, direct */
|
||||
#define R_PPBASE 0x34 /* PP: Global base address type */
|
||||
#define R_PPLBASE 0x35 /* PP: Local base address type */
|
||||
#define R_PP15 0x38 /* PP: Global 15 bit offset */
|
||||
#define R_PP15W 0x39 /* PP: Global 15 bit offset divided by 4 */
|
||||
#define R_PP15H 0x3A /* PP: Global 15 bit offset divided by 2 */
|
||||
#define R_PP16B 0x3B /* PP: Global 16 bit offset for bytes */
|
||||
#define R_PPL15 0x3C /* PP: Local 15 bit offset */
|
||||
#define R_PPL15W 0x3D /* PP: Local 15 bit offset divided by 4 */
|
||||
#define R_PPL15H 0x3E /* PP: Local 15 bit offset divided by 2 */
|
||||
#define R_PPL16B 0x3F /* PP: Local 16 bit offset for bytes */
|
||||
#define R_PPN15 0x40 /* PP: Global 15 bit negative offset */
|
||||
#define R_PPN15W 0x41 /* PP: Global 15 bit negative offset divided by 4 */
|
||||
#define R_PPN15H 0x42 /* PP: Global 15 bit negative offset divided by 2 */
|
||||
#define R_PPN16B 0x43 /* PP: Global 16 bit negative byte offset */
|
||||
#define R_PPLN15 0x44 /* PP: Local 15 bit negative offset */
|
||||
#define R_PPLN15W 0x45 /* PP: Local 15 bit negative offset divided by 4 */
|
||||
#define R_PPLN15H 0x46 /* PP: Local 15 bit negative offset divided by 2 */
|
||||
#define R_PPLN16B 0x47 /* PP: Local 16 bit negative byte offset */
|
||||
#define R_MPPCR15W 0x4E /* MP: 15 bit PC-relative divided by 4 */
|
||||
#define R_MPPCR 0x4F /* MP: 32 bit PC-relative divided by 4 */
|
||||
@@ -1,46 +0,0 @@
|
||||
/* coff information for WDC 65816
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define L_LNNO_SIZE 4
|
||||
#include "coff/external.h"
|
||||
|
||||
#define W65MAGIC 0x6500
|
||||
|
||||
#define W65BADMAG(x) (((x).f_magic != W65MAGIC))
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the w65 don't have room in the instruction for the entire
|
||||
offset - eg the strange jump and high page addressing modes */
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
/* coff information for we32k
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
#define L_LNNO_SIZE 2
|
||||
#include "coff/external.h"
|
||||
|
||||
/* Bits for f_flags:
|
||||
F_RELFLG relocation info stripped from file
|
||||
F_EXEC file is executable (no unresolved external references)
|
||||
F_LNNO line numbers stripped from file
|
||||
F_LSYMS local symbols stripped from file
|
||||
F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
#define F_BM32B (0020000)
|
||||
#define F_BM32MAU (0040000)
|
||||
|
||||
#define WE32KMAGIC 0x170 /* we32k sans transfer vector */
|
||||
#define FBOMAGIC 0x170 /* we32k sans transfer vector */
|
||||
#define MTVMAGIC 0x171 /* we32k with transfer vector */
|
||||
#define RBOMAGIC 0x172 /* reserved */
|
||||
#define WE32KBADMAG(x) ( ((x).f_magic != WE32KMAGIC) \
|
||||
&& ((x).f_magic != FBOMAGIC) \
|
||||
&& ((x).f_magic != RBOMAGIC) \
|
||||
&& ((x).f_magic != MTVMAGIC))
|
||||
|
||||
/* More names of "special" sections. */
|
||||
#define _TV ".tv"
|
||||
#define _INIT ".init"
|
||||
#define _FINI ".fini"
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
@@ -1,639 +0,0 @@
|
||||
/* Internal format of XCOFF object file data structures for BFD.
|
||||
|
||||
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef _INTERNAL_XCOFF_H
|
||||
#define _INTERNAL_XCOFF_H
|
||||
|
||||
/* Linker */
|
||||
|
||||
/* Names of "special" sections. */
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _PAD ".pad"
|
||||
#define _LOADER ".loader"
|
||||
#define _EXCEPT ".except"
|
||||
#define _TYPCHK ".typchk"
|
||||
|
||||
/* XCOFF uses a special .loader section with type STYP_LOADER. */
|
||||
#define STYP_LOADER 0x1000
|
||||
|
||||
/* XCOFF uses a special .debug section with type STYP_DEBUG. */
|
||||
#define STYP_DEBUG 0x2000
|
||||
|
||||
/* XCOFF handles line number or relocation overflow by creating
|
||||
another section header with STYP_OVRFLO set. */
|
||||
#define STYP_OVRFLO 0x8000
|
||||
|
||||
/* Specifies an exception section. A section of this type provides
|
||||
information to identify the reason that a trap or ececptin occured within
|
||||
and executable object program */
|
||||
#define STYP_EXCEPT 0x0100
|
||||
|
||||
/* Specifies a type check section. A section of this type contains parameter
|
||||
argument type check strings used by the AIX binder. */
|
||||
#define STYP_TYPCHK 0x4000
|
||||
|
||||
#define RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
|
||||
#define RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
|
||||
#define RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
|
||||
|
||||
/* XCOFF relocation types.
|
||||
The relocations are described in the function
|
||||
xcoff[64]_ppc_relocate_section in coff64-rs6000.c and coff-rs6000.c */
|
||||
|
||||
#define R_POS (0x00)
|
||||
#define R_NEG (0x01)
|
||||
#define R_REL (0x02)
|
||||
#define R_TOC (0x03)
|
||||
#define R_RTB (0x04)
|
||||
#define R_GL (0x05)
|
||||
#define R_TCL (0x06)
|
||||
#define R_BA (0x08)
|
||||
#define R_BR (0x0a)
|
||||
#define R_RL (0x0c)
|
||||
#define R_RLA (0x0d)
|
||||
#define R_REF (0x0f)
|
||||
#define R_TRL (0x12)
|
||||
#define R_TRLA (0x13)
|
||||
#define R_RRTBI (0x14)
|
||||
#define R_RRTBA (0x15)
|
||||
#define R_CAI (0x16)
|
||||
#define R_CREL (0x17)
|
||||
#define R_RBA (0x18)
|
||||
#define R_RBAC (0x19)
|
||||
#define R_RBR (0x1a)
|
||||
#define R_RBRC (0x1b)
|
||||
|
||||
/* Storage class #defines, from /usr/include/storclass.h that are not already
|
||||
defined in internal.h */
|
||||
|
||||
/* Comment string in .info section */
|
||||
#define C_INFO 110
|
||||
|
||||
/* Auxillary Symbol Entries */
|
||||
|
||||
/* x_smtyp values: */
|
||||
#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */
|
||||
#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */
|
||||
/* Symbol type values: */
|
||||
#define XTY_ER 0 /* External reference */
|
||||
#define XTY_SD 1 /* Csect definition */
|
||||
#define XTY_LD 2 /* Label definition */
|
||||
#define XTY_CM 3 /* .BSS */
|
||||
#define XTY_EM 4 /* Error message */
|
||||
#define XTY_US 5 /* "Reserved for internal use" */
|
||||
|
||||
/* x_smclas values: */
|
||||
#define XMC_PR 0 /* Read-only program code */
|
||||
#define XMC_RO 1 /* Read-only constant */
|
||||
#define XMC_DB 2 /* Read-only debug dictionary table */
|
||||
#define XMC_TC 3 /* Read-write general TOC entry */
|
||||
#define XMC_UA 4 /* Read-write unclassified */
|
||||
#define XMC_RW 5 /* Read-write data */
|
||||
#define XMC_GL 6 /* Read-only global linkage */
|
||||
#define XMC_XO 7 /* Read-only extended operation */
|
||||
#define XMC_SV 8 /* Read-only supervisor call */
|
||||
#define XMC_BS 9 /* Read-write BSS */
|
||||
#define XMC_DS 10 /* Read-write descriptor csect */
|
||||
#define XMC_UC 11 /* Read-write unnamed Fortran common */
|
||||
#define XMC_TI 12 /* Read-only traceback index csect */
|
||||
#define XMC_TB 13 /* Read-only traceback table csect */
|
||||
/* 14 ??? */
|
||||
#define XMC_TC0 15 /* Read-write TOC anchor */
|
||||
#define XMC_TD 16 /* Read-write data in TOC */
|
||||
#define XMC_SV64 17 /* Read-only 64 bit supervisor call */
|
||||
#define XMC_SV3264 18 /* Read-only 32 or 64 bit supervisor call */
|
||||
|
||||
/* The ldhdr structure. This appears at the start of the .loader
|
||||
section. */
|
||||
|
||||
struct internal_ldhdr
|
||||
{
|
||||
/* The version number:
|
||||
1 : 32 bit
|
||||
2 : 64 bit */
|
||||
unsigned long l_version;
|
||||
|
||||
/* The number of symbol table entries. */
|
||||
bfd_size_type l_nsyms;
|
||||
|
||||
/* The number of relocation table entries. */
|
||||
bfd_size_type l_nreloc;
|
||||
|
||||
/* The length of the import file string table. */
|
||||
bfd_size_type l_istlen;
|
||||
|
||||
/* The number of import files. */
|
||||
bfd_size_type l_nimpid;
|
||||
|
||||
/* The offset from the start of the .loader section to the first
|
||||
entry in the import file table. */
|
||||
bfd_size_type l_impoff;
|
||||
|
||||
/* The length of the string table. */
|
||||
bfd_size_type l_stlen;
|
||||
|
||||
/* The offset from the start of the .loader section to the first
|
||||
entry in the string table. */
|
||||
bfd_size_type l_stoff;
|
||||
|
||||
/* The offset to start of the symbol table, only in XCOFF64 */
|
||||
bfd_vma l_symoff;
|
||||
|
||||
/* The offset to the start of the relocation table, only in XCOFF64 */
|
||||
bfd_vma l_rldoff;
|
||||
};
|
||||
|
||||
/* The ldsym structure. This is used to represent a symbol in the
|
||||
.loader section. */
|
||||
|
||||
struct internal_ldsym
|
||||
{
|
||||
union
|
||||
{
|
||||
/* The symbol name if <= SYMNMLEN characters. */
|
||||
char _l_name[SYMNMLEN];
|
||||
struct
|
||||
{
|
||||
/* Zero if the symbol name is more than SYMNMLEN characters. */
|
||||
long _l_zeroes;
|
||||
|
||||
/* The offset in the string table if the symbol name is more
|
||||
than SYMNMLEN characters. */
|
||||
long _l_offset;
|
||||
}
|
||||
_l_l;
|
||||
}
|
||||
_l;
|
||||
|
||||
/* The symbol value. */
|
||||
bfd_vma l_value;
|
||||
|
||||
/* The symbol section number. */
|
||||
short l_scnum;
|
||||
|
||||
/* The symbol type and flags. */
|
||||
char l_smtype;
|
||||
|
||||
/* The symbol storage class. */
|
||||
char l_smclas;
|
||||
|
||||
/* The import file ID. */
|
||||
bfd_size_type l_ifile;
|
||||
|
||||
/* Offset to the parameter type check string. */
|
||||
bfd_size_type l_parm;
|
||||
};
|
||||
|
||||
/* These flags are for the l_smtype field (the lower three bits are an
|
||||
XTY_* value). */
|
||||
|
||||
/* Imported symbol. */
|
||||
#define L_IMPORT (0x40)
|
||||
/* Entry point. */
|
||||
#define L_ENTRY (0x20)
|
||||
/* Exported symbol. */
|
||||
#define L_EXPORT (0x10)
|
||||
|
||||
/* The ldrel structure. This is used to represent a reloc in the
|
||||
.loader section. */
|
||||
|
||||
struct internal_ldrel
|
||||
{
|
||||
/* The reloc address. */
|
||||
bfd_vma l_vaddr;
|
||||
|
||||
/* The symbol table index in the .loader section symbol table. */
|
||||
bfd_size_type l_symndx;
|
||||
|
||||
/* The relocation type and size. */
|
||||
short l_rtype;
|
||||
|
||||
/* The section number this relocation applies to. */
|
||||
short l_rsecnm;
|
||||
};
|
||||
|
||||
/* An entry in the XCOFF linker hash table. */
|
||||
struct xcoff_link_hash_entry
|
||||
{
|
||||
struct bfd_link_hash_entry root;
|
||||
|
||||
/* Symbol index in output file. Set to -1 initially. Set to -2 if
|
||||
there is a reloc against this symbol. */
|
||||
long indx;
|
||||
|
||||
/* If we have created a TOC entry for this symbol, this is the .tc
|
||||
section which holds it. */
|
||||
asection *toc_section;
|
||||
|
||||
union
|
||||
{
|
||||
/* If we have created a TOC entry (the XCOFF_SET_TOC flag is
|
||||
set), this is the offset in toc_section. */
|
||||
bfd_vma toc_offset;
|
||||
|
||||
/* If the TOC entry comes from an input file, this is set to the
|
||||
symbol index of the C_HIDEXT XMC_TC or XMC_TD symbol. */
|
||||
long toc_indx;
|
||||
}
|
||||
u;
|
||||
|
||||
/* If this symbol is a function entry point which is called, this
|
||||
field holds a pointer to the function descriptor. If this symbol
|
||||
is a function descriptor, this field holds a pointer to the
|
||||
function entry point. */
|
||||
struct xcoff_link_hash_entry *descriptor;
|
||||
|
||||
/* The .loader symbol table entry, if there is one. */
|
||||
struct internal_ldsym *ldsym;
|
||||
|
||||
/* If XCOFF_BUILT_LDSYM is set, this is the .loader symbol table
|
||||
index. If XCOFF_BUILD_LDSYM is clear, and XCOFF_IMPORT is set,
|
||||
this is the l_ifile value. */
|
||||
long ldindx;
|
||||
|
||||
/* Some linker flags. */
|
||||
unsigned long flags;
|
||||
|
||||
/* The storage mapping class. */
|
||||
unsigned char smclas;
|
||||
};
|
||||
|
||||
/* Flags for xcoff_link_hash_entry. */
|
||||
|
||||
/* Symbol is referenced by a regular object. */
|
||||
#define XCOFF_REF_REGULAR 0x00000001
|
||||
/* Symbol is defined by a regular object. */
|
||||
#define XCOFF_DEF_REGULAR 0x00000002
|
||||
/* Symbol is defined by a dynamic object. */
|
||||
#define XCOFF_DEF_DYNAMIC 0x00000004
|
||||
/* Symbol is used in a reloc being copied into the .loader section. */
|
||||
#define XCOFF_LDREL 0x00000008
|
||||
/* Symbol is the entry point. */
|
||||
#define XCOFF_ENTRY 0x00000010
|
||||
/* Symbol is called; this is, it appears in a R_BR reloc. */
|
||||
#define XCOFF_CALLED 0x00000020
|
||||
/* Symbol needs the TOC entry filled in. */
|
||||
#define XCOFF_SET_TOC 0x00000040
|
||||
/* Symbol is explicitly imported. */
|
||||
#define XCOFF_IMPORT 0x00000080
|
||||
/* Symbol is explicitly exported. */
|
||||
#define XCOFF_EXPORT 0x00000100
|
||||
/* Symbol has been processed by xcoff_build_ldsyms. */
|
||||
#define XCOFF_BUILT_LDSYM 0x00000200
|
||||
/* Symbol is mentioned by a section which was not garbage collected. */
|
||||
#define XCOFF_MARK 0x00000400
|
||||
/* Symbol size is recorded in size_list list from hash table. */
|
||||
#define XCOFF_HAS_SIZE 0x00000800
|
||||
/* Symbol is a function descriptor. */
|
||||
#define XCOFF_DESCRIPTOR 0x00001000
|
||||
/* Multiple definitions have been for the symbol. */
|
||||
#define XCOFF_MULTIPLY_DEFINED 0x00002000
|
||||
/* Symbol is the __rtinit symbol. */
|
||||
#define XCOFF_RTINIT 0x00004000
|
||||
/* Symbol is an imported 32 bit syscall. */
|
||||
#define XCOFF_SYSCALL32 0x00008000
|
||||
/* Symbol is an imported 64 bit syscall. */
|
||||
#define XCOFF_SYSCALL64 0x00010000
|
||||
|
||||
/* The XCOFF linker hash table. */
|
||||
|
||||
#define XCOFF_NUMBER_OF_SPECIAL_SECTIONS 6
|
||||
#define XCOFF_SPECIAL_SECTION_TEXT 0
|
||||
#define XCOFF_SPECIAL_SECTION_ETEXT 1
|
||||
#define XCOFF_SPECIAL_SECTION_DATA 2
|
||||
#define XCOFF_SPECIAL_SECTION_EDATA 3
|
||||
#define XCOFF_SPECIAL_SECTION_END 4
|
||||
#define XCOFF_SPECIAL_SECTION_END2 5
|
||||
|
||||
struct xcoff_link_hash_table
|
||||
{
|
||||
struct bfd_link_hash_table root;
|
||||
|
||||
/* The .debug string hash table. We need to compute this while
|
||||
reading the input files, so that we know how large the .debug
|
||||
section will be before we assign section positions. */
|
||||
struct bfd_strtab_hash *debug_strtab;
|
||||
|
||||
/* The .debug section we will use for the final output. */
|
||||
asection *debug_section;
|
||||
|
||||
/* The .loader section we will use for the final output. */
|
||||
asection *loader_section;
|
||||
|
||||
/* A count of non TOC relative relocs which will need to be
|
||||
allocated in the .loader section. */
|
||||
size_t ldrel_count;
|
||||
|
||||
/* The .loader section header. */
|
||||
struct internal_ldhdr ldhdr;
|
||||
|
||||
/* The .gl section we use to hold global linkage code. */
|
||||
asection *linkage_section;
|
||||
|
||||
/* The .tc section we use to hold toc entries we build for global
|
||||
linkage code. */
|
||||
asection *toc_section;
|
||||
|
||||
/* The .ds section we use to hold function descriptors which we
|
||||
create for exported symbols. */
|
||||
asection *descriptor_section;
|
||||
|
||||
/* The list of import files. */
|
||||
struct xcoff_import_file *imports;
|
||||
|
||||
/* Required alignment of sections within the output file. */
|
||||
unsigned long file_align;
|
||||
|
||||
/* Whether the .text section must be read-only. */
|
||||
bfd_boolean textro;
|
||||
|
||||
/* Whether garbage collection was done. */
|
||||
bfd_boolean gc;
|
||||
|
||||
/* A linked list of symbols for which we have size information. */
|
||||
struct xcoff_link_size_list
|
||||
{
|
||||
struct xcoff_link_size_list *next;
|
||||
struct xcoff_link_hash_entry *h;
|
||||
bfd_size_type size;
|
||||
}
|
||||
*size_list;
|
||||
|
||||
/* Magic sections: _text, _etext, _data, _edata, _end, end. */
|
||||
asection *special_sections[XCOFF_NUMBER_OF_SPECIAL_SECTIONS];
|
||||
};
|
||||
|
||||
|
||||
/* This structure is used to pass information through
|
||||
xcoff_link_hash_traverse. */
|
||||
|
||||
struct xcoff_loader_info
|
||||
{
|
||||
/* Set if a problem occurred. */
|
||||
bfd_boolean failed;
|
||||
|
||||
/* Output BFD. */
|
||||
bfd *output_bfd;
|
||||
|
||||
/* Link information structure. */
|
||||
struct bfd_link_info *info;
|
||||
|
||||
/* Whether all defined symbols should be exported. */
|
||||
bfd_boolean export_defineds;
|
||||
|
||||
/* Number of ldsym structures. */
|
||||
size_t ldsym_count;
|
||||
|
||||
/* Size of string table. */
|
||||
size_t string_size;
|
||||
|
||||
/* String table. */
|
||||
char *strings;
|
||||
|
||||
/* Allocated size of string table. */
|
||||
size_t string_alc;
|
||||
};
|
||||
|
||||
/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
|
||||
from smaller values. Start with zero, widen, *then* decrement. */
|
||||
#define MINUS_ONE (((bfd_vma) 0) - 1)
|
||||
|
||||
/* __rtinit, from /usr/include/rtinit.h. */
|
||||
struct __rtinit
|
||||
{
|
||||
/* Pointer to runtime linker.
|
||||
XXX: Is the parameter really void? */
|
||||
int (*rtl) (void);
|
||||
|
||||
/* Offset to array of init functions, 0 if none. */
|
||||
int init_offset;
|
||||
|
||||
/* Offset to array of fini functions, 0 if none. */
|
||||
int fini_offset;
|
||||
|
||||
/* Size of __RTINIT_DESCRIPTOR. This value should be used instead of
|
||||
sizeof(__RTINIT_DESCRIPTOR). */
|
||||
int __rtinit_descriptor_size;
|
||||
};
|
||||
|
||||
#define RTINIT_DESCRIPTOR_SIZE (12)
|
||||
|
||||
struct __rtinit_descriptor
|
||||
{
|
||||
/* Init/fini function. */
|
||||
int f;
|
||||
|
||||
/* Offset, relative to the start of the __rtinit symbol, to name of the
|
||||
function. */
|
||||
|
||||
int name_offset;
|
||||
|
||||
/* Flags */
|
||||
unsigned char flags;
|
||||
};
|
||||
|
||||
/* Archive */
|
||||
|
||||
#define XCOFFARMAG "<aiaff>\012"
|
||||
#define XCOFFARMAGBIG "<bigaf>\012"
|
||||
#define SXCOFFARMAG 8
|
||||
|
||||
/* The size of the ascii archive elements */
|
||||
#define XCOFFARMAG_ELEMENT_SIZE 12
|
||||
#define XCOFFARMAGBIG_ELEMENT_SIZE 20
|
||||
|
||||
/* This terminates an XCOFF archive member name. */
|
||||
|
||||
#define XCOFFARFMAG "`\012"
|
||||
#define SXCOFFARFMAG 2
|
||||
|
||||
/* XCOFF archives start with this (printable) structure. */
|
||||
|
||||
struct xcoff_ar_file_hdr
|
||||
{
|
||||
/* Magic string. */
|
||||
char magic[SXCOFFARMAG];
|
||||
|
||||
/* Offset of the member table (decimal ASCII string). */
|
||||
char memoff[XCOFFARMAG_ELEMENT_SIZE];
|
||||
|
||||
/* Offset of the global symbol table (decimal ASCII string). */
|
||||
char symoff[XCOFFARMAG_ELEMENT_SIZE];
|
||||
|
||||
/* Offset of the first member in the archive (decimal ASCII string). */
|
||||
char firstmemoff[XCOFFARMAG_ELEMENT_SIZE];
|
||||
|
||||
/* Offset of the last member in the archive (decimal ASCII string). */
|
||||
char lastmemoff[XCOFFARMAG_ELEMENT_SIZE];
|
||||
|
||||
/* Offset of the first member on the free list (decimal ASCII
|
||||
string). */
|
||||
char freeoff[XCOFFARMAG_ELEMENT_SIZE];
|
||||
};
|
||||
|
||||
#define SIZEOF_AR_FILE_HDR (SXCOFFARMAG + 5 * XCOFFARMAG_ELEMENT_SIZE)
|
||||
|
||||
/* This is the equivalent data structure for the big archive format. */
|
||||
|
||||
struct xcoff_ar_file_hdr_big
|
||||
{
|
||||
/* Magic string. */
|
||||
char magic[SXCOFFARMAG];
|
||||
|
||||
/* Offset of the member table (decimal ASCII string). */
|
||||
char memoff[XCOFFARMAGBIG_ELEMENT_SIZE];
|
||||
|
||||
/* Offset of the global symbol table for 32-bit objects (decimal ASCII
|
||||
string). */
|
||||
char symoff[XCOFFARMAGBIG_ELEMENT_SIZE];
|
||||
|
||||
/* Offset of the global symbol table for 64-bit objects (decimal ASCII
|
||||
string). */
|
||||
char symoff64[XCOFFARMAGBIG_ELEMENT_SIZE];
|
||||
|
||||
/* Offset of the first member in the archive (decimal ASCII string). */
|
||||
char firstmemoff[XCOFFARMAGBIG_ELEMENT_SIZE];
|
||||
|
||||
/* Offset of the last member in the archive (decimal ASCII string). */
|
||||
char lastmemoff[XCOFFARMAGBIG_ELEMENT_SIZE];
|
||||
|
||||
/* Offset of the first member on the free list (decimal ASCII
|
||||
string). */
|
||||
char freeoff[XCOFFARMAGBIG_ELEMENT_SIZE];
|
||||
};
|
||||
|
||||
#define SIZEOF_AR_FILE_HDR_BIG (SXCOFFARMAG + 6 * XCOFFARMAGBIG_ELEMENT_SIZE)
|
||||
|
||||
/* Each XCOFF archive member starts with this (printable) structure. */
|
||||
|
||||
struct xcoff_ar_hdr
|
||||
{
|
||||
/* File size not including the header (decimal ASCII string). */
|
||||
char size[XCOFFARMAG_ELEMENT_SIZE];
|
||||
|
||||
/* File offset of next archive member (decimal ASCII string). */
|
||||
char nextoff[XCOFFARMAG_ELEMENT_SIZE];
|
||||
|
||||
/* File offset of previous archive member (decimal ASCII string). */
|
||||
char prevoff[XCOFFARMAG_ELEMENT_SIZE];
|
||||
|
||||
/* File mtime (decimal ASCII string). */
|
||||
char date[12];
|
||||
|
||||
/* File UID (decimal ASCII string). */
|
||||
char uid[12];
|
||||
|
||||
/* File GID (decimal ASCII string). */
|
||||
char gid[12];
|
||||
|
||||
/* File mode (octal ASCII string). */
|
||||
char mode[12];
|
||||
|
||||
/* Length of file name (decimal ASCII string). */
|
||||
char namlen[4];
|
||||
|
||||
/* This structure is followed by the file name. The length of the
|
||||
name is given in the namlen field. If the length of the name is
|
||||
odd, the name is followed by a null byte. The name and optional
|
||||
null byte are followed by XCOFFARFMAG, which is not included in
|
||||
namlen. The contents of the archive member follow; the number of
|
||||
bytes is given in the size field. */
|
||||
};
|
||||
|
||||
#define SIZEOF_AR_HDR (3 * XCOFFARMAG_ELEMENT_SIZE + 4 * 12 + 4)
|
||||
|
||||
/* The equivalent for the big archive format. */
|
||||
|
||||
struct xcoff_ar_hdr_big
|
||||
{
|
||||
/* File size not including the header (decimal ASCII string). */
|
||||
char size[XCOFFARMAGBIG_ELEMENT_SIZE];
|
||||
|
||||
/* File offset of next archive member (decimal ASCII string). */
|
||||
char nextoff[XCOFFARMAGBIG_ELEMENT_SIZE];
|
||||
|
||||
/* File offset of previous archive member (decimal ASCII string). */
|
||||
char prevoff[XCOFFARMAGBIG_ELEMENT_SIZE];
|
||||
|
||||
/* File mtime (decimal ASCII string). */
|
||||
char date[12];
|
||||
|
||||
/* File UID (decimal ASCII string). */
|
||||
char uid[12];
|
||||
|
||||
/* File GID (decimal ASCII string). */
|
||||
char gid[12];
|
||||
|
||||
/* File mode (octal ASCII string). */
|
||||
char mode[12];
|
||||
|
||||
/* Length of file name (decimal ASCII string). */
|
||||
char namlen[4];
|
||||
|
||||
/* This structure is followed by the file name. The length of the
|
||||
name is given in the namlen field. If the length of the name is
|
||||
odd, the name is followed by a null byte. The name and optional
|
||||
null byte are followed by XCOFFARFMAG, which is not included in
|
||||
namlen. The contents of the archive member follow; the number of
|
||||
bytes is given in the size field. */
|
||||
};
|
||||
|
||||
#define SIZEOF_AR_HDR_BIG (3 * XCOFFARMAGBIG_ELEMENT_SIZE + 4 * 12 + 4)
|
||||
|
||||
/* We often have to distinguish between the old and big file format.
|
||||
Make it a bit cleaner. We can use `xcoff_ardata' here because the
|
||||
`hdr' member has the same size and position in both formats.
|
||||
<bigaf> is the default format, return TRUE even when xcoff_ardata is
|
||||
NULL. */
|
||||
#ifndef SMALL_ARCHIVE
|
||||
/* Creates big archives by default */
|
||||
#define xcoff_big_format_p(abfd) \
|
||||
((NULL != bfd_ardata (abfd) && NULL == xcoff_ardata (abfd)) || \
|
||||
((NULL != bfd_ardata (abfd)) && \
|
||||
(NULL != xcoff_ardata (abfd)) && \
|
||||
(xcoff_ardata (abfd)->magic[1] == 'b')))
|
||||
#else
|
||||
/* Creates small archives by default. */
|
||||
#define xcoff_big_format_p(abfd) \
|
||||
(((NULL != bfd_ardata (abfd)) && \
|
||||
(NULL != xcoff_ardata (abfd)) && \
|
||||
(xcoff_ardata (abfd)->magic[1] == 'b')))
|
||||
#endif
|
||||
|
||||
/* We store a copy of the xcoff_ar_file_hdr in the tdata field of the
|
||||
artdata structure. Similar for the big archive. */
|
||||
#define xcoff_ardata(abfd) \
|
||||
((struct xcoff_ar_file_hdr *) bfd_ardata (abfd)->tdata)
|
||||
#define xcoff_ardata_big(abfd) \
|
||||
((struct xcoff_ar_file_hdr_big *) bfd_ardata (abfd)->tdata)
|
||||
|
||||
/* We store a copy of the xcoff_ar_hdr in the arelt_data field of an
|
||||
archive element. Similar for the big archive. */
|
||||
#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))
|
||||
#define arch_xhdr(bfd) \
|
||||
((struct xcoff_ar_hdr *) arch_eltdata (bfd)->arch_header)
|
||||
#define arch_xhdr_big(bfd) \
|
||||
((struct xcoff_ar_hdr_big *) arch_eltdata (bfd)->arch_header)
|
||||
|
||||
#endif /* _INTERNAL_XCOFF_H */
|
||||
@@ -1,51 +0,0 @@
|
||||
/* coff information for Zilog Z80
|
||||
Copyright 2005 Free Software Foundation, Inc.
|
||||
Contributed by Arnold Metselaar <arnold_m@operamail.com>
|
||||
|
||||
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, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define L_LNNO_SIZE 4
|
||||
#include "coff/external.h"
|
||||
|
||||
/* z80 backend does not use dots in section names. */
|
||||
#undef _TEXT
|
||||
#define _TEXT "text"
|
||||
#undef _DATA
|
||||
#define _DATA "data"
|
||||
#undef _BSS
|
||||
#define _BSS "bss"
|
||||
|
||||
/* Type of cpu is stored in flags. */
|
||||
#define F_MACHMASK 0xF000
|
||||
|
||||
#define Z80MAGIC 0x805A
|
||||
|
||||
#define Z80BADMAG(x) (((x).f_magic != Z80MAGIC))
|
||||
|
||||
/* Relocation directives. */
|
||||
|
||||
/* This format actually has more bits than we need. */
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
@@ -1,48 +0,0 @@
|
||||
/* coff information for Zilog Z800N
|
||||
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#define L_LNNO_SIZE 4
|
||||
#include "coff/external.h"
|
||||
|
||||
/* Type of cpu is stored in flags */
|
||||
#define F_Z8001 0x1000
|
||||
#define F_Z8002 0x2000
|
||||
#define F_MACHMASK 0xf000
|
||||
|
||||
#define Z8KMAGIC 0x8000
|
||||
|
||||
#define Z8KBADMAG(x) (((x).f_magic != Z8KMAGIC))
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the z8k don't have room in the instruction for the entire
|
||||
offset - eg with segments. */
|
||||
|
||||
struct external_reloc
|
||||
{
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
@@ -1,536 +0,0 @@
|
||||
/* Defs for interface to demanglers.
|
||||
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002,
|
||||
2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
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, 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., 51 Franklin Street - Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
|
||||
#if !defined (DEMANGLE_H)
|
||||
#define DEMANGLE_H
|
||||
|
||||
#include "libiberty.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Options passed to cplus_demangle (in 2nd parameter). */
|
||||
|
||||
#define DMGL_NO_OPTS 0 /* For readability... */
|
||||
#define DMGL_PARAMS (1 << 0) /* Include function args */
|
||||
#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
|
||||
#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
|
||||
#define DMGL_VERBOSE (1 << 3) /* Include implementation details. */
|
||||
#define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */
|
||||
#define DMGL_RET_POSTFIX (1 << 5) /* Print function return types (when
|
||||
present) after function signature */
|
||||
|
||||
#define DMGL_AUTO (1 << 8)
|
||||
#define DMGL_GNU (1 << 9)
|
||||
#define DMGL_LUCID (1 << 10)
|
||||
#define DMGL_ARM (1 << 11)
|
||||
#define DMGL_HP (1 << 12) /* For the HP aCC compiler;
|
||||
same as ARM except for
|
||||
template arguments, etc. */
|
||||
#define DMGL_EDG (1 << 13)
|
||||
#define DMGL_GNU_V3 (1 << 14)
|
||||
#define DMGL_GNAT (1 << 15)
|
||||
|
||||
/* If none of these are set, use 'current_demangling_style' as the default. */
|
||||
#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT)
|
||||
|
||||
/* Enumeration of possible demangling styles.
|
||||
|
||||
Lucid and ARM styles are still kept logically distinct, even though
|
||||
they now both behave identically. The resulting style is actual the
|
||||
union of both. I.E. either style recognizes both "__pt__" and "__rf__"
|
||||
for operator "->", even though the first is lucid style and the second
|
||||
is ARM style. (FIXME?) */
|
||||
|
||||
extern enum demangling_styles
|
||||
{
|
||||
no_demangling = -1,
|
||||
unknown_demangling = 0,
|
||||
auto_demangling = DMGL_AUTO,
|
||||
gnu_demangling = DMGL_GNU,
|
||||
lucid_demangling = DMGL_LUCID,
|
||||
arm_demangling = DMGL_ARM,
|
||||
hp_demangling = DMGL_HP,
|
||||
edg_demangling = DMGL_EDG,
|
||||
gnu_v3_demangling = DMGL_GNU_V3,
|
||||
java_demangling = DMGL_JAVA,
|
||||
gnat_demangling = DMGL_GNAT
|
||||
} current_demangling_style;
|
||||
|
||||
/* Define string names for the various demangling styles. */
|
||||
|
||||
#define NO_DEMANGLING_STYLE_STRING "none"
|
||||
#define AUTO_DEMANGLING_STYLE_STRING "auto"
|
||||
#define GNU_DEMANGLING_STYLE_STRING "gnu"
|
||||
#define LUCID_DEMANGLING_STYLE_STRING "lucid"
|
||||
#define ARM_DEMANGLING_STYLE_STRING "arm"
|
||||
#define HP_DEMANGLING_STYLE_STRING "hp"
|
||||
#define EDG_DEMANGLING_STYLE_STRING "edg"
|
||||
#define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3"
|
||||
#define JAVA_DEMANGLING_STYLE_STRING "java"
|
||||
#define GNAT_DEMANGLING_STYLE_STRING "gnat"
|
||||
|
||||
/* Some macros to test what demangling style is active. */
|
||||
|
||||
#define CURRENT_DEMANGLING_STYLE current_demangling_style
|
||||
#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
|
||||
#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
|
||||
#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
|
||||
#define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM)
|
||||
#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP)
|
||||
#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG)
|
||||
#define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3)
|
||||
#define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA)
|
||||
#define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT)
|
||||
|
||||
/* Provide information about the available demangle styles. This code is
|
||||
pulled from gdb into libiberty because it is useful to binutils also. */
|
||||
|
||||
extern const struct demangler_engine
|
||||
{
|
||||
const char *const demangling_style_name;
|
||||
const enum demangling_styles demangling_style;
|
||||
const char *const demangling_style_doc;
|
||||
} libiberty_demanglers[];
|
||||
|
||||
extern char *
|
||||
cplus_demangle (const char *mangled, int options);
|
||||
|
||||
extern int
|
||||
cplus_demangle_opname (const char *opname, char *result, int options);
|
||||
|
||||
extern const char *
|
||||
cplus_mangle_opname (const char *opname, int options);
|
||||
|
||||
/* Note: This sets global state. FIXME if you care about multi-threading. */
|
||||
|
||||
extern void
|
||||
set_cplus_marker_for_demangling (int ch);
|
||||
|
||||
extern enum demangling_styles
|
||||
cplus_demangle_set_style (enum demangling_styles style);
|
||||
|
||||
extern enum demangling_styles
|
||||
cplus_demangle_name_to_style (const char *name);
|
||||
|
||||
/* V3 ABI demangling entry points, defined in cp-demangle.c. */
|
||||
extern char*
|
||||
cplus_demangle_v3 (const char* mangled, int options);
|
||||
|
||||
extern char*
|
||||
java_demangle_v3 (const char* mangled);
|
||||
|
||||
|
||||
enum gnu_v3_ctor_kinds {
|
||||
gnu_v3_complete_object_ctor = 1,
|
||||
gnu_v3_base_object_ctor,
|
||||
gnu_v3_complete_object_allocating_ctor
|
||||
};
|
||||
|
||||
/* Return non-zero iff NAME is the mangled form of a constructor name
|
||||
in the G++ V3 ABI demangling style. Specifically, return an `enum
|
||||
gnu_v3_ctor_kinds' value indicating what kind of constructor
|
||||
it is. */
|
||||
extern enum gnu_v3_ctor_kinds
|
||||
is_gnu_v3_mangled_ctor (const char *name);
|
||||
|
||||
|
||||
enum gnu_v3_dtor_kinds {
|
||||
gnu_v3_deleting_dtor = 1,
|
||||
gnu_v3_complete_object_dtor,
|
||||
gnu_v3_base_object_dtor
|
||||
};
|
||||
|
||||
/* Return non-zero iff NAME is the mangled form of a destructor name
|
||||
in the G++ V3 ABI demangling style. Specifically, return an `enum
|
||||
gnu_v3_dtor_kinds' value, indicating what kind of destructor
|
||||
it is. */
|
||||
extern enum gnu_v3_dtor_kinds
|
||||
is_gnu_v3_mangled_dtor (const char *name);
|
||||
|
||||
/* The V3 demangler works in two passes. The first pass builds a tree
|
||||
representation of the mangled name, and the second pass turns the
|
||||
tree representation into a demangled string. Here we define an
|
||||
interface to permit a caller to build their own tree
|
||||
representation, which they can pass to the demangler to get a
|
||||
demangled string. This can be used to canonicalize user input into
|
||||
something which the demangler might output. It could also be used
|
||||
by other demanglers in the future. */
|
||||
|
||||
/* These are the component types which may be found in the tree. Many
|
||||
component types have one or two subtrees, referred to as left and
|
||||
right (a component type with only one subtree puts it in the left
|
||||
subtree). */
|
||||
|
||||
enum demangle_component_type
|
||||
{
|
||||
/* A name, with a length and a pointer to a string. */
|
||||
DEMANGLE_COMPONENT_NAME,
|
||||
/* A qualified name. The left subtree is a class or namespace or
|
||||
some such thing, and the right subtree is a name qualified by
|
||||
that class. */
|
||||
DEMANGLE_COMPONENT_QUAL_NAME,
|
||||
/* A local name. The left subtree describes a function, and the
|
||||
right subtree is a name which is local to that function. */
|
||||
DEMANGLE_COMPONENT_LOCAL_NAME,
|
||||
/* A typed name. The left subtree is a name, and the right subtree
|
||||
describes that name as a function. */
|
||||
DEMANGLE_COMPONENT_TYPED_NAME,
|
||||
/* A template. The left subtree is a template name, and the right
|
||||
subtree is a template argument list. */
|
||||
DEMANGLE_COMPONENT_TEMPLATE,
|
||||
/* A template parameter. This holds a number, which is the template
|
||||
parameter index. */
|
||||
DEMANGLE_COMPONENT_TEMPLATE_PARAM,
|
||||
/* A constructor. This holds a name and the kind of
|
||||
constructor. */
|
||||
DEMANGLE_COMPONENT_CTOR,
|
||||
/* A destructor. This holds a name and the kind of destructor. */
|
||||
DEMANGLE_COMPONENT_DTOR,
|
||||
/* A vtable. This has one subtree, the type for which this is a
|
||||
vtable. */
|
||||
DEMANGLE_COMPONENT_VTABLE,
|
||||
/* A VTT structure. This has one subtree, the type for which this
|
||||
is a VTT. */
|
||||
DEMANGLE_COMPONENT_VTT,
|
||||
/* A construction vtable. The left subtree is the type for which
|
||||
this is a vtable, and the right subtree is the derived type for
|
||||
which this vtable is built. */
|
||||
DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE,
|
||||
/* A typeinfo structure. This has one subtree, the type for which
|
||||
this is the tpeinfo structure. */
|
||||
DEMANGLE_COMPONENT_TYPEINFO,
|
||||
/* A typeinfo name. This has one subtree, the type for which this
|
||||
is the typeinfo name. */
|
||||
DEMANGLE_COMPONENT_TYPEINFO_NAME,
|
||||
/* A typeinfo function. This has one subtree, the type for which
|
||||
this is the tpyeinfo function. */
|
||||
DEMANGLE_COMPONENT_TYPEINFO_FN,
|
||||
/* A thunk. This has one subtree, the name for which this is a
|
||||
thunk. */
|
||||
DEMANGLE_COMPONENT_THUNK,
|
||||
/* A virtual thunk. This has one subtree, the name for which this
|
||||
is a virtual thunk. */
|
||||
DEMANGLE_COMPONENT_VIRTUAL_THUNK,
|
||||
/* A covariant thunk. This has one subtree, the name for which this
|
||||
is a covariant thunk. */
|
||||
DEMANGLE_COMPONENT_COVARIANT_THUNK,
|
||||
/* A Java class. This has one subtree, the type. */
|
||||
DEMANGLE_COMPONENT_JAVA_CLASS,
|
||||
/* A guard variable. This has one subtree, the name for which this
|
||||
is a guard variable. */
|
||||
DEMANGLE_COMPONENT_GUARD,
|
||||
/* A reference temporary. This has one subtree, the name for which
|
||||
this is a temporary. */
|
||||
DEMANGLE_COMPONENT_REFTEMP,
|
||||
/* A hidden alias. This has one subtree, the encoding for which it
|
||||
is providing alternative linkage. */
|
||||
DEMANGLE_COMPONENT_HIDDEN_ALIAS,
|
||||
/* A standard substitution. This holds the name of the
|
||||
substitution. */
|
||||
DEMANGLE_COMPONENT_SUB_STD,
|
||||
/* The restrict qualifier. The one subtree is the type which is
|
||||
being qualified. */
|
||||
DEMANGLE_COMPONENT_RESTRICT,
|
||||
/* The volatile qualifier. The one subtree is the type which is
|
||||
being qualified. */
|
||||
DEMANGLE_COMPONENT_VOLATILE,
|
||||
/* The const qualifier. The one subtree is the type which is being
|
||||
qualified. */
|
||||
DEMANGLE_COMPONENT_CONST,
|
||||
/* The restrict qualifier modifying a member function. The one
|
||||
subtree is the type which is being qualified. */
|
||||
DEMANGLE_COMPONENT_RESTRICT_THIS,
|
||||
/* The volatile qualifier modifying a member function. The one
|
||||
subtree is the type which is being qualified. */
|
||||
DEMANGLE_COMPONENT_VOLATILE_THIS,
|
||||
/* The const qualifier modifying a member function. The one subtree
|
||||
is the type which is being qualified. */
|
||||
DEMANGLE_COMPONENT_CONST_THIS,
|
||||
/* A vendor qualifier. The left subtree is the type which is being
|
||||
qualified, and the right subtree is the name of the
|
||||
qualifier. */
|
||||
DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL,
|
||||
/* A pointer. The one subtree is the type which is being pointed
|
||||
to. */
|
||||
DEMANGLE_COMPONENT_POINTER,
|
||||
/* A reference. The one subtree is the type which is being
|
||||
referenced. */
|
||||
DEMANGLE_COMPONENT_REFERENCE,
|
||||
/* A complex type. The one subtree is the base type. */
|
||||
DEMANGLE_COMPONENT_COMPLEX,
|
||||
/* An imaginary type. The one subtree is the base type. */
|
||||
DEMANGLE_COMPONENT_IMAGINARY,
|
||||
/* A builtin type. This holds the builtin type information. */
|
||||
DEMANGLE_COMPONENT_BUILTIN_TYPE,
|
||||
/* A vendor's builtin type. This holds the name of the type. */
|
||||
DEMANGLE_COMPONENT_VENDOR_TYPE,
|
||||
/* A function type. The left subtree is the return type. The right
|
||||
subtree is a list of ARGLIST nodes. Either or both may be
|
||||
NULL. */
|
||||
DEMANGLE_COMPONENT_FUNCTION_TYPE,
|
||||
/* An array type. The left subtree is the dimension, which may be
|
||||
NULL, or a string (represented as DEMANGLE_COMPONENT_NAME), or an
|
||||
expression. The right subtree is the element type. */
|
||||
DEMANGLE_COMPONENT_ARRAY_TYPE,
|
||||
/* A pointer to member type. The left subtree is the class type,
|
||||
and the right subtree is the member type. CV-qualifiers appear
|
||||
on the latter. */
|
||||
DEMANGLE_COMPONENT_PTRMEM_TYPE,
|
||||
/* An argument list. The left subtree is the current argument, and
|
||||
the right subtree is either NULL or another ARGLIST node. */
|
||||
DEMANGLE_COMPONENT_ARGLIST,
|
||||
/* A template argument list. The left subtree is the current
|
||||
template argument, and the right subtree is either NULL or
|
||||
another TEMPLATE_ARGLIST node. */
|
||||
DEMANGLE_COMPONENT_TEMPLATE_ARGLIST,
|
||||
/* An operator. This holds information about a standard
|
||||
operator. */
|
||||
DEMANGLE_COMPONENT_OPERATOR,
|
||||
/* An extended operator. This holds the number of arguments, and
|
||||
the name of the extended operator. */
|
||||
DEMANGLE_COMPONENT_EXTENDED_OPERATOR,
|
||||
/* A typecast, represented as a unary operator. The one subtree is
|
||||
the type to which the argument should be cast. */
|
||||
DEMANGLE_COMPONENT_CAST,
|
||||
/* A unary expression. The left subtree is the operator, and the
|
||||
right subtree is the single argument. */
|
||||
DEMANGLE_COMPONENT_UNARY,
|
||||
/* A binary expression. The left subtree is the operator, and the
|
||||
right subtree is a BINARY_ARGS. */
|
||||
DEMANGLE_COMPONENT_BINARY,
|
||||
/* Arguments to a binary expression. The left subtree is the first
|
||||
argument, and the right subtree is the second argument. */
|
||||
DEMANGLE_COMPONENT_BINARY_ARGS,
|
||||
/* A trinary expression. The left subtree is the operator, and the
|
||||
right subtree is a TRINARY_ARG1. */
|
||||
DEMANGLE_COMPONENT_TRINARY,
|
||||
/* Arguments to a trinary expression. The left subtree is the first
|
||||
argument, and the right subtree is a TRINARY_ARG2. */
|
||||
DEMANGLE_COMPONENT_TRINARY_ARG1,
|
||||
/* More arguments to a trinary expression. The left subtree is the
|
||||
second argument, and the right subtree is the third argument. */
|
||||
DEMANGLE_COMPONENT_TRINARY_ARG2,
|
||||
/* A literal. The left subtree is the type, and the right subtree
|
||||
is the value, represented as a DEMANGLE_COMPONENT_NAME. */
|
||||
DEMANGLE_COMPONENT_LITERAL,
|
||||
/* A negative literal. Like LITERAL, but the value is negated.
|
||||
This is a minor hack: the NAME used for LITERAL points directly
|
||||
to the mangled string, but since negative numbers are mangled
|
||||
using 'n' instead of '-', we want a way to indicate a negative
|
||||
number which involves neither modifying the mangled string nor
|
||||
allocating a new copy of the literal in memory. */
|
||||
DEMANGLE_COMPONENT_LITERAL_NEG
|
||||
};
|
||||
|
||||
/* Types which are only used internally. */
|
||||
|
||||
struct demangle_operator_info;
|
||||
struct demangle_builtin_type_info;
|
||||
|
||||
/* A node in the tree representation is an instance of a struct
|
||||
demangle_component. Note that the field names of the struct are
|
||||
not well protected against macros defined by the file including
|
||||
this one. We can fix this if it ever becomes a problem. */
|
||||
|
||||
struct demangle_component
|
||||
{
|
||||
/* The type of this component. */
|
||||
enum demangle_component_type type;
|
||||
|
||||
union
|
||||
{
|
||||
/* For DEMANGLE_COMPONENT_NAME. */
|
||||
struct
|
||||
{
|
||||
/* A pointer to the name (which need not NULL terminated) and
|
||||
its length. */
|
||||
const char *s;
|
||||
int len;
|
||||
} s_name;
|
||||
|
||||
/* For DEMANGLE_COMPONENT_OPERATOR. */
|
||||
struct
|
||||
{
|
||||
/* Operator. */
|
||||
const struct demangle_operator_info *op;
|
||||
} s_operator;
|
||||
|
||||
/* For DEMANGLE_COMPONENT_EXTENDED_OPERATOR. */
|
||||
struct
|
||||
{
|
||||
/* Number of arguments. */
|
||||
int args;
|
||||
/* Name. */
|
||||
struct demangle_component *name;
|
||||
} s_extended_operator;
|
||||
|
||||
/* For DEMANGLE_COMPONENT_CTOR. */
|
||||
struct
|
||||
{
|
||||
/* Kind of constructor. */
|
||||
enum gnu_v3_ctor_kinds kind;
|
||||
/* Name. */
|
||||
struct demangle_component *name;
|
||||
} s_ctor;
|
||||
|
||||
/* For DEMANGLE_COMPONENT_DTOR. */
|
||||
struct
|
||||
{
|
||||
/* Kind of destructor. */
|
||||
enum gnu_v3_dtor_kinds kind;
|
||||
/* Name. */
|
||||
struct demangle_component *name;
|
||||
} s_dtor;
|
||||
|
||||
/* For DEMANGLE_COMPONENT_BUILTIN_TYPE. */
|
||||
struct
|
||||
{
|
||||
/* Builtin type. */
|
||||
const struct demangle_builtin_type_info *type;
|
||||
} s_builtin;
|
||||
|
||||
/* For DEMANGLE_COMPONENT_SUB_STD. */
|
||||
struct
|
||||
{
|
||||
/* Standard substitution string. */
|
||||
const char* string;
|
||||
/* Length of string. */
|
||||
int len;
|
||||
} s_string;
|
||||
|
||||
/* For DEMANGLE_COMPONENT_TEMPLATE_PARAM. */
|
||||
struct
|
||||
{
|
||||
/* Template parameter index. */
|
||||
long number;
|
||||
} s_number;
|
||||
|
||||
/* For other types. */
|
||||
struct
|
||||
{
|
||||
/* Left (or only) subtree. */
|
||||
struct demangle_component *left;
|
||||
/* Right subtree. */
|
||||
struct demangle_component *right;
|
||||
} s_binary;
|
||||
|
||||
} u;
|
||||
};
|
||||
|
||||
/* People building mangled trees are expected to allocate instances of
|
||||
struct demangle_component themselves. They can then call one of
|
||||
the following functions to fill them in. */
|
||||
|
||||
/* Fill in most component types with a left subtree and a right
|
||||
subtree. Returns non-zero on success, zero on failure, such as an
|
||||
unrecognized or inappropriate component type. */
|
||||
|
||||
extern int
|
||||
cplus_demangle_fill_component (struct demangle_component *fill,
|
||||
enum demangle_component_type,
|
||||
struct demangle_component *left,
|
||||
struct demangle_component *right);
|
||||
|
||||
/* Fill in a DEMANGLE_COMPONENT_NAME. Returns non-zero on success,
|
||||
zero for bad arguments. */
|
||||
|
||||
extern int
|
||||
cplus_demangle_fill_name (struct demangle_component *fill,
|
||||
const char *, int);
|
||||
|
||||
/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE, using the name of the
|
||||
builtin type (e.g., "int", etc.). Returns non-zero on success,
|
||||
zero if the type is not recognized. */
|
||||
|
||||
extern int
|
||||
cplus_demangle_fill_builtin_type (struct demangle_component *fill,
|
||||
const char *type_name);
|
||||
|
||||
/* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the
|
||||
operator and the number of arguments which it takes (the latter is
|
||||
used to disambiguate operators which can be both binary and unary,
|
||||
such as '-'). Returns non-zero on success, zero if the operator is
|
||||
not recognized. */
|
||||
|
||||
extern int
|
||||
cplus_demangle_fill_operator (struct demangle_component *fill,
|
||||
const char *opname, int args);
|
||||
|
||||
/* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR, providing the
|
||||
number of arguments and the name. Returns non-zero on success,
|
||||
zero for bad arguments. */
|
||||
|
||||
extern int
|
||||
cplus_demangle_fill_extended_operator (struct demangle_component *fill,
|
||||
int numargs,
|
||||
struct demangle_component *nm);
|
||||
|
||||
/* Fill in a DEMANGLE_COMPONENT_CTOR. Returns non-zero on success,
|
||||
zero for bad arguments. */
|
||||
|
||||
extern int
|
||||
cplus_demangle_fill_ctor (struct demangle_component *fill,
|
||||
enum gnu_v3_ctor_kinds kind,
|
||||
struct demangle_component *name);
|
||||
|
||||
/* Fill in a DEMANGLE_COMPONENT_DTOR. Returns non-zero on success,
|
||||
zero for bad arguments. */
|
||||
|
||||
extern int
|
||||
cplus_demangle_fill_dtor (struct demangle_component *fill,
|
||||
enum gnu_v3_dtor_kinds kind,
|
||||
struct demangle_component *name);
|
||||
|
||||
/* This function translates a mangled name into a struct
|
||||
demangle_component tree. The first argument is the mangled name.
|
||||
The second argument is DMGL_* options. This returns a pointer to a
|
||||
tree on success, or NULL on failure. On success, the third
|
||||
argument is set to a block of memory allocated by malloc. This
|
||||
block should be passed to free when the tree is no longer
|
||||
needed. */
|
||||
|
||||
extern struct demangle_component *
|
||||
cplus_demangle_v3_components (const char *mangled, int options, void **mem);
|
||||
|
||||
/* This function takes a struct demangle_component tree and returns
|
||||
the corresponding demangled string. The first argument is DMGL_*
|
||||
options. The second is the tree to demangle. The third is a guess
|
||||
at the length of the demangled string, used to initially allocate
|
||||
the return buffer. The fourth is a pointer to a size_t. On
|
||||
success, this function returns a buffer allocated by malloc(), and
|
||||
sets the size_t pointed to by the fourth argument to the size of
|
||||
the allocated buffer (not the length of the returned string). On
|
||||
failure, this function returns NULL, and sets the size_t pointed to
|
||||
by the fourth argument to 0 for an invalid tree, or to 1 for a
|
||||
memory allocation error. */
|
||||
|
||||
extern char *
|
||||
cplus_demangle_print (int options,
|
||||
const struct demangle_component *tree,
|
||||
int estimated_length,
|
||||
size_t *p_allocated_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* DEMANGLE_H */
|
||||
@@ -1,339 +0,0 @@
|
||||
/* Interface between the opcode library and its callers.
|
||||
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
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, 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., 51 Franklin Street - Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
Written by Cygnus Support, 1993.
|
||||
|
||||
The opcode library (libopcodes.a) provides instruction decoders for
|
||||
a large variety of instruction sets, callable with an identical
|
||||
interface, for making instruction-processing programs more independent
|
||||
of the instruction set being processed. */
|
||||
|
||||
#ifndef DIS_ASM_H
|
||||
#define DIS_ASM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "bfd.h"
|
||||
|
||||
typedef int (*fprintf_ftype) (void *, const char*, ...) ATTRIBUTE_FPTR_PRINTF_2;
|
||||
|
||||
enum dis_insn_type {
|
||||
dis_noninsn, /* Not a valid instruction */
|
||||
dis_nonbranch, /* Not a branch instruction */
|
||||
dis_branch, /* Unconditional branch */
|
||||
dis_condbranch, /* Conditional branch */
|
||||
dis_jsr, /* Jump to subroutine */
|
||||
dis_condjsr, /* Conditional jump to subroutine */
|
||||
dis_dref, /* Data reference instruction */
|
||||
dis_dref2 /* Two data references in instruction */
|
||||
};
|
||||
|
||||
/* This struct is passed into the instruction decoding routine,
|
||||
and is passed back out into each callback. The various fields are used
|
||||
for conveying information from your main routine into your callbacks,
|
||||
for passing information into the instruction decoders (such as the
|
||||
addresses of the callback functions), or for passing information
|
||||
back from the instruction decoders to their callers.
|
||||
|
||||
It must be initialized before it is first passed; this can be done
|
||||
by hand, or using one of the initialization macros below. */
|
||||
|
||||
typedef struct disassemble_info {
|
||||
fprintf_ftype fprintf_func;
|
||||
void *stream;
|
||||
void *application_data;
|
||||
|
||||
/* Target description. We could replace this with a pointer to the bfd,
|
||||
but that would require one. There currently isn't any such requirement
|
||||
so to avoid introducing one we record these explicitly. */
|
||||
/* The bfd_flavour. This can be bfd_target_unknown_flavour. */
|
||||
enum bfd_flavour flavour;
|
||||
/* The bfd_arch value. */
|
||||
enum bfd_architecture arch;
|
||||
/* The bfd_mach value. */
|
||||
unsigned long mach;
|
||||
/* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */
|
||||
enum bfd_endian endian;
|
||||
/* An arch/mach-specific bitmask of selected instruction subsets, mainly
|
||||
for processors with run-time-switchable instruction sets. The default,
|
||||
zero, means that there is no constraint. CGEN-based opcodes ports
|
||||
may use ISA_foo masks. */
|
||||
void *insn_sets;
|
||||
|
||||
/* Some targets need information about the current section to accurately
|
||||
display insns. If this is NULL, the target disassembler function
|
||||
will have to make its best guess. */
|
||||
asection *section;
|
||||
|
||||
/* An array of pointers to symbols either at the location being disassembled
|
||||
or at the start of the function being disassembled. The array is sorted
|
||||
so that the first symbol is intended to be the one used. The others are
|
||||
present for any misc. purposes. This is not set reliably, but if it is
|
||||
not NULL, it is correct. */
|
||||
asymbol **symbols;
|
||||
/* Number of symbols in array. */
|
||||
int num_symbols;
|
||||
|
||||
/* For use by the disassembler.
|
||||
The top 16 bits are reserved for public use (and are documented here).
|
||||
The bottom 16 bits are for the internal use of the disassembler. */
|
||||
unsigned long flags;
|
||||
#define INSN_HAS_RELOC 0x80000000
|
||||
void *private_data;
|
||||
|
||||
/* Function used to get bytes to disassemble. MEMADDR is the
|
||||
address of the stuff to be disassembled, MYADDR is the address to
|
||||
put the bytes in, and LENGTH is the number of bytes to read.
|
||||
INFO is a pointer to this struct.
|
||||
Returns an errno value or 0 for success. */
|
||||
int (*read_memory_func)
|
||||
(bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
|
||||
struct disassemble_info *info);
|
||||
|
||||
/* Function which should be called if we get an error that we can't
|
||||
recover from. STATUS is the errno value from read_memory_func and
|
||||
MEMADDR is the address that we were trying to read. INFO is a
|
||||
pointer to this struct. */
|
||||
void (*memory_error_func)
|
||||
(int status, bfd_vma memaddr, struct disassemble_info *info);
|
||||
|
||||
/* Function called to print ADDR. */
|
||||
void (*print_address_func)
|
||||
(bfd_vma addr, struct disassemble_info *info);
|
||||
|
||||
/* Function called to determine if there is a symbol at the given ADDR.
|
||||
If there is, the function returns 1, otherwise it returns 0.
|
||||
This is used by ports which support an overlay manager where
|
||||
the overlay number is held in the top part of an address. In
|
||||
some circumstances we want to include the overlay number in the
|
||||
address, (normally because there is a symbol associated with
|
||||
that address), but sometimes we want to mask out the overlay bits. */
|
||||
int (* symbol_at_address_func)
|
||||
(bfd_vma addr, struct disassemble_info * info);
|
||||
|
||||
/* Function called to check if a SYMBOL is can be displayed to the user.
|
||||
This is used by some ports that want to hide special symbols when
|
||||
displaying debugging outout. */
|
||||
bfd_boolean (* symbol_is_valid)
|
||||
(asymbol *, struct disassemble_info * info);
|
||||
|
||||
/* These are for buffer_read_memory. */
|
||||
bfd_byte *buffer;
|
||||
bfd_vma buffer_vma;
|
||||
unsigned int buffer_length;
|
||||
|
||||
/* This variable may be set by the instruction decoder. It suggests
|
||||
the number of bytes objdump should display on a single line. If
|
||||
the instruction decoder sets this, it should always set it to
|
||||
the same value in order to get reasonable looking output. */
|
||||
int bytes_per_line;
|
||||
|
||||
/* The next two variables control the way objdump displays the raw data. */
|
||||
/* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */
|
||||
/* output will look like this:
|
||||
00: 00000000 00000000
|
||||
with the chunks displayed according to "display_endian". */
|
||||
int bytes_per_chunk;
|
||||
enum bfd_endian display_endian;
|
||||
|
||||
/* Number of octets per incremented target address
|
||||
Normally one, but some DSPs have byte sizes of 16 or 32 bits. */
|
||||
unsigned int octets_per_byte;
|
||||
|
||||
/* The number of zeroes we want to see at the end of a section before we
|
||||
start skipping them. */
|
||||
unsigned int skip_zeroes;
|
||||
|
||||
/* The number of zeroes to skip at the end of a section. If the number
|
||||
of zeroes at the end is between SKIP_ZEROES_AT_END and SKIP_ZEROES,
|
||||
they will be disassembled. If there are fewer than
|
||||
SKIP_ZEROES_AT_END, they will be skipped. This is a heuristic
|
||||
attempt to avoid disassembling zeroes inserted by section
|
||||
alignment. */
|
||||
unsigned int skip_zeroes_at_end;
|
||||
|
||||
/* Whether the disassembler always needs the relocations. */
|
||||
bfd_boolean disassembler_needs_relocs;
|
||||
|
||||
/* Results from instruction decoders. Not all decoders yet support
|
||||
this information. This info is set each time an instruction is
|
||||
decoded, and is only valid for the last such instruction.
|
||||
|
||||
To determine whether this decoder supports this information, set
|
||||
insn_info_valid to 0, decode an instruction, then check it. */
|
||||
|
||||
char insn_info_valid; /* Branch info has been set. */
|
||||
char branch_delay_insns; /* How many sequential insn's will run before
|
||||
a branch takes effect. (0 = normal) */
|
||||
char data_size; /* Size of data reference in insn, in bytes */
|
||||
enum dis_insn_type insn_type; /* Type of instruction */
|
||||
bfd_vma target; /* Target address of branch or dref, if known;
|
||||
zero if unknown. */
|
||||
bfd_vma target2; /* Second target address for dref2 */
|
||||
|
||||
/* Command line options specific to the target disassembler. */
|
||||
char * disassembler_options;
|
||||
|
||||
} disassemble_info;
|
||||
|
||||
|
||||
/* Standard disassemblers. Disassemble one instruction at the given
|
||||
target address. Return number of octets processed. */
|
||||
typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *);
|
||||
|
||||
extern int print_insn_big_mips (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_little_mips (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_i386 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_i386_att (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_i386_intel (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_ia64 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_i370 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m68hc11 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m68hc12 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m68k (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_z80 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_z8001 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_z8002 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_h8300 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_h8300h (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_h8300s (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_h8500 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_alpha (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_big_arm (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_little_arm (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_sparc (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_avr (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_bfin (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_d10v (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_d30v (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_dlx (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_fr30 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_hppa (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_i860 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_i960 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_ip2k (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m32r (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m88k (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_maxq_little (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_maxq_big (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_mcore (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_mmix (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_mn10200 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_mn10300 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_mt (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_msp430 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_ns32k (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_crx (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_openrisc (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_big_or32 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_little_or32 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_pdp11 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_pj (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_big_powerpc (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_little_powerpc (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_rs6000 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_s390 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_sh (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_tic30 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_tic4x (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_tic54x (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_tic80 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_v850 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_vax (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_w65 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_xstormy16 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_xtensa (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_sh64 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_sh64x_media (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_frv (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_iq2000 (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_xc16x (bfd_vma, disassemble_info *);
|
||||
extern int print_insn_m32c (bfd_vma, disassemble_info *);
|
||||
|
||||
extern disassembler_ftype arc_get_disassembler (void *);
|
||||
extern disassembler_ftype cris_get_disassembler (bfd *);
|
||||
|
||||
extern void print_mips_disassembler_options (FILE *);
|
||||
extern void print_ppc_disassembler_options (FILE *);
|
||||
extern void print_arm_disassembler_options (FILE *);
|
||||
extern void parse_arm_disassembler_option (char *);
|
||||
extern int get_arm_regname_num_options (void);
|
||||
extern int set_arm_regname_option (int);
|
||||
extern int get_arm_regnames (int, const char **, const char **, const char *const **);
|
||||
extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *);
|
||||
|
||||
/* Fetch the disassembler for a given BFD, if that support is available. */
|
||||
extern disassembler_ftype disassembler (bfd *);
|
||||
|
||||
/* Amend the disassemble_info structure as necessary for the target architecture.
|
||||
Should only be called after initialising the info->arch field. */
|
||||
extern void disassemble_init_for_target (struct disassemble_info * info);
|
||||
|
||||
/* Document any target specific options available from the disassembler. */
|
||||
extern void disassembler_usage (FILE *);
|
||||
|
||||
|
||||
/* This block of definitions is for particular callers who read instructions
|
||||
into a buffer before calling the instruction decoder. */
|
||||
|
||||
/* Here is a function which callers may wish to use for read_memory_func.
|
||||
It gets bytes from a buffer. */
|
||||
extern int buffer_read_memory
|
||||
(bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *);
|
||||
|
||||
/* This function goes with buffer_read_memory.
|
||||
It prints a message using info->fprintf_func and info->stream. */
|
||||
extern void perror_memory (int, bfd_vma, struct disassemble_info *);
|
||||
|
||||
|
||||
/* Just print the address in hex. This is included for completeness even
|
||||
though both GDB and objdump provide their own (to print symbolic
|
||||
addresses). */
|
||||
extern void generic_print_address
|
||||
(bfd_vma, struct disassemble_info *);
|
||||
|
||||
/* Always true. */
|
||||
extern int generic_symbol_at_address
|
||||
(bfd_vma, struct disassemble_info *);
|
||||
|
||||
/* Also always true. */
|
||||
extern bfd_boolean generic_symbol_is_valid
|
||||
(asymbol *, struct disassemble_info *);
|
||||
|
||||
/* Method to initialize a disassemble_info struct. This should be
|
||||
called by all applications creating such a struct. */
|
||||
extern void init_disassemble_info (struct disassemble_info *info, void *stream,
|
||||
fprintf_ftype fprintf_func);
|
||||
|
||||
/* For compatibility with existing code. */
|
||||
#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
|
||||
init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
|
||||
#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \
|
||||
init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ! defined (DIS_ASM_H) */
|
||||
@@ -1,60 +0,0 @@
|
||||
/* An abstract string datatype.
|
||||
Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Mark Mitchell (mark@markmitchell.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC 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, or (at your option)
|
||||
any later version.
|
||||
|
||||
GCC 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 GCC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 51 Franklin Street - Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
|
||||
typedef struct dyn_string
|
||||
{
|
||||
int allocated; /* The amount of space allocated for the string. */
|
||||
int length; /* The actual length of the string. */
|
||||
char *s; /* The string itself, NUL-terminated. */
|
||||
}* dyn_string_t;
|
||||
|
||||
/* The length STR, in bytes, not including the terminating NUL. */
|
||||
#define dyn_string_length(STR) \
|
||||
((STR)->length)
|
||||
|
||||
/* The NTBS in which the contents of STR are stored. */
|
||||
#define dyn_string_buf(STR) \
|
||||
((STR)->s)
|
||||
|
||||
/* Compare DS1 to DS2 with strcmp. */
|
||||
#define dyn_string_compare(DS1, DS2) \
|
||||
(strcmp ((DS1)->s, (DS2)->s))
|
||||
|
||||
|
||||
extern int dyn_string_init (struct dyn_string *, int);
|
||||
extern dyn_string_t dyn_string_new (int);
|
||||
extern void dyn_string_delete (dyn_string_t);
|
||||
extern char *dyn_string_release (dyn_string_t);
|
||||
extern dyn_string_t dyn_string_resize (dyn_string_t, int);
|
||||
extern void dyn_string_clear (dyn_string_t);
|
||||
extern int dyn_string_copy (dyn_string_t, dyn_string_t);
|
||||
extern int dyn_string_copy_cstr (dyn_string_t, const char *);
|
||||
extern int dyn_string_prepend (dyn_string_t, dyn_string_t);
|
||||
extern int dyn_string_prepend_cstr (dyn_string_t, const char *);
|
||||
extern int dyn_string_insert (dyn_string_t, int, dyn_string_t);
|
||||
extern int dyn_string_insert_cstr (dyn_string_t, int, const char *);
|
||||
extern int dyn_string_insert_char (dyn_string_t, int, int);
|
||||
extern int dyn_string_append (dyn_string_t, dyn_string_t);
|
||||
extern int dyn_string_append_cstr (dyn_string_t, const char *);
|
||||
extern int dyn_string_append_char (dyn_string_t, int);
|
||||
extern int dyn_string_substring (dyn_string_t, dyn_string_t, int, int);
|
||||
extern int dyn_string_eq (dyn_string_t, dyn_string_t);
|
||||
@@ -1,500 +0,0 @@
|
||||
2006-07-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* common.h (SHT_GNU_HASH, DT_GNU_HASH): Define.
|
||||
|
||||
2006-05-31 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* internal.h (ELF_SECTION_SIZE): New.
|
||||
(ELF_IS_SECTION_IN_SEGMENT): Likewise.
|
||||
(ELF_IS_SECTION_IN_SEGMENT_FILE): Updated.
|
||||
(ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise.
|
||||
|
||||
2006-05-27 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* internal.h (struct elf_segment_map): Add p_align and p_align_valid.
|
||||
|
||||
2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
|
||||
Randolph Chung <randolph@tausq.org>
|
||||
* hppa.h (R_PARISC_TLS_GD21L, R_PARISC_TLS_GD14R, R_PARISC_TLS_GDCALL,
|
||||
R_PARISC_TLS_LDM21L, R_PARISC_TLS_LDM14R, R_PARISC_TLS_LDMCALL,
|
||||
R_PARISC_TLS_LDO21L, R_PARISC_TLS_LDO14R, R_PARISC_TLS_DTPMOD32,
|
||||
R_PARISC_TLS_DTPMOD64, R_PARISC_TLS_DTPOFF32, R_PARISC_TLS_DTPOFF64):
|
||||
New TLS relocs.
|
||||
(R_PARISC_TLS_LE21L, R_PARISC_TLS_LE14R, R_PARISC_TLS_IE21L,
|
||||
R_PARISC_TLS_IE14R, R_PARISC_TLS_TPREL32, R_PARISC_TLS_TPREL64):
|
||||
Define TLS relocs using existing equivalents.
|
||||
|
||||
2006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
|
||||
|
||||
* avr.h: Add E_AVR_MACH_AVR6, R_AVR_LO8_LDI_GS and R_AVR_HI8_LDI_GS.
|
||||
|
||||
2006-03-22 Richard Sandiford <richard@codesourcery.com>
|
||||
Daniel Jacobowitz <dan@codesourcery.com>
|
||||
Phil Edwards <phil@codesourcery.com>
|
||||
Zack Weinberg <zack@codesourcery.com>
|
||||
Mark Mitchell <mark@codesourcery.com>
|
||||
Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* mips.h (R_MIPS_COPY, R_MIPS_JUMP_SLOT): New relocs.
|
||||
|
||||
2006-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
* hppa.h (SHF_HP_TLS, SHF_HP_NEAR_SHARED, SHF_HP_FAR_SHARED,
|
||||
SHF_HP_COMDAT, SHF_HP_CONST, SHN_TLS_COMMON, SHN_NS_COMMON,
|
||||
SHN_NS_UNDEF, SHN_FS_UNDEF, SHN_HP_EXTERN, SHN_HP_EXTHINT,
|
||||
SHN_HP_UNDEF_BIND_IMM, SHT_HP_OVLBITS, SHT_HP_DLKM, SHT_HP_COMDAT,
|
||||
SHT_HP_OBJDICT, SHT_HP_ANNOT, STB_HP_ALIAS): Define.
|
||||
|
||||
2006-03-10 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* arm.h (EF_ARM_EABI_VER5): Define.
|
||||
|
||||
2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A,
|
||||
EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B, EF_M68K_ISA_C): Adjust.
|
||||
(EF_M68K_ISA_A_NODIV, EF_M68K_ISA_B_NOUSP): New.
|
||||
(EF_M68K_HW_DIV, EF_M68K_USP): Remove.
|
||||
(EF_M68K_MAC, EF_M68K_EMAC, EF_M68K_FLOAT): Adjust.
|
||||
(EF_M68K_EMAC_B): New.
|
||||
|
||||
2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
|
||||
|
||||
* avr.h (R_AVR_MS8_LDI,R_AVR_MS8_LDI_NEG): Add.
|
||||
(EF_AVR_LINKRELAX_PREPARED): Add.
|
||||
|
||||
2006-03-02 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
Import from the GCC tree:
|
||||
2006-03-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* dwarf2.h (DW_TAG_condition, DW_TAG_shared_type): New constants
|
||||
from DWARF 3.
|
||||
(DW_AT_description, DW_AT_binary_scale, DW_AT_decimal_scale,
|
||||
DW_AT_small, DW_AT_decimal_sign, DW_AT_digit_count,
|
||||
DW_AT_picture_string, DW_AT_mutable, DW_AT_threads_scaled,
|
||||
DW_AT_explicit, DW_AT_object_pointer, DW_AT_endianity,
|
||||
DW_AT_elemental, DW_AT_pure, DW_AT_recursive): New.
|
||||
(DW_OP_form_tls_address, DW_OP_call_frame_cfa, DW_OP_bit_piece): New.
|
||||
(DW_ATE_packed_decimal, DW_ATE_numeric_string, DW_ATE_edited,
|
||||
DW_ATE_signed_fixed, DW_ATE_unsigned_fixed): New.
|
||||
(DW_DS_unsigned, DW_DS_leading_overpunch, DW_DS_trailing_overpunch,
|
||||
DW_DS_leading_separate, DW_DS_trailing_separate): New.
|
||||
(DW_END_default, DW_END_big, DW_END_little): New.
|
||||
(DW_END_lo_user, DW_END_hi_user): Define.
|
||||
(DW_LNE_lo_user, DW_LNE_hi_user): Define.
|
||||
(DW_CFA_val_offset, DW_CFA_val_offset_sf, DW_CFA_val_expression): New.
|
||||
(DW_LANG_PLI, DW_LANG_ObjC, DW_LANG_ObjC_plus_plus, DW_LANG_UPC,
|
||||
DW_LANG_D): New.
|
||||
|
||||
2006-02-24 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* m32c.h: Add relax relocs.
|
||||
|
||||
2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
|
||||
Anil Paranjape <anilp1@kpitcummins.com>
|
||||
Shilin Shakti <shilins@kpitcummins.com>
|
||||
|
||||
* common.h (EM_XC16X): New entry for xc16x cpu.
|
||||
Sort other EM_* numbers into numerical order.
|
||||
* xc16x.h: New file.
|
||||
|
||||
2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/2258
|
||||
* internal.h (ELF_IS_SECTION_IN_SEGMENT_FILE): New.
|
||||
(ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise.
|
||||
|
||||
2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* m68k.h (EF_CPU32, EF_M68000, EF_CFV4E): Rename to ...
|
||||
(EF_M68K_CPU32, EF_M68K_M68000, EF_M68K_CFV4E): ... here.
|
||||
(EF_M68K_ISA_MASK, EF_M68K_ISA_A, EF_M68K_M68K_ISA_A_PLUS,
|
||||
EF_M68K_ISA_B, EF_M68K_HW_DIV, EF_M68K_MAC_MASK, EF_M68K_MAC,
|
||||
EF_M68K_EMAC, EF_M68K_USP, EF_M68K_FLOAT): New.
|
||||
|
||||
2006-02-06 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
* ia64.h (SHF_IA_64_HP_TLS): New.
|
||||
|
||||
2006-01-18 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
Introduce TLS descriptors for i386 and x86_64.
|
||||
* common.h (DT_TLSDESC_GOT, DT_TLSDESC_PLT): New.
|
||||
* i386.h (R_386_TLS_GOTDESC, R_386_TLS_DESC_CALL, R_386_TLS_DESC):
|
||||
New.
|
||||
* x86-64.h (R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL,
|
||||
R_X86_64_TLSDESC): New.
|
||||
|
||||
2006-01-09 Mike Frysinger <vapier@gentoo.org>:
|
||||
|
||||
* common.h (EM_ALTERA_NIOS2, EM_NIOS32) Define.
|
||||
|
||||
2005-12-16 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
Second part of ms1 to mt renaming.
|
||||
* common.h (EM_MT): Renamed.
|
||||
* mt.h: Rename relocs, cpu & other defines.
|
||||
|
||||
2005-12-12 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* arm.h (elf32_arm_get_eabi_attr_int): Add prototype.
|
||||
|
||||
2005-11-11 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 1150
|
||||
* mips.h (STO_OPTIONAL): Define.
|
||||
(ELF_MIPS_IS_OPTIONAL): Define.
|
||||
|
||||
2005-09-30 Catherine Moore <clm@cm00re.com>
|
||||
|
||||
* bfin.h: New file.
|
||||
* common.h (EM_BLACKFIN): Define.
|
||||
|
||||
2005-10-08 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* arm.h: Add prototypes for BFD object attribute routines.
|
||||
|
||||
2005-09-09 Richard Earnshaw <richard.earnshaw@arm.com>
|
||||
|
||||
* arm.h (SHT_ARM_PREEMPTMAP, SHT_ARM_ATTRIBUTES): New defines.
|
||||
|
||||
2005-08-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
* hppa.h (SHT_PARISC_DLKM, SHF_PARISC_WEAKORDER, PT_PARISC_WEAKORDER):
|
||||
New defines.
|
||||
|
||||
2005-08-04 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
* hppa.h (PF_HP_CODE, PF_HP_MODIFY, PF_HP_LAZYSWAP): Revise defines.
|
||||
(PF_HP_CODE_DEPR, PF_HP_MODIFY_DEPR, PF_HP_LAZYSWAP_DEPR): New
|
||||
deprecated defines.
|
||||
(DT_HP_EPLTREL, DT_HP_EPLTRELSZ, DT_HP_FILTERED, DT_HP_FILTER_TLS,
|
||||
DT_HP_COMPAT_FILTERED, DT_HP_LAZYLOAD, DT_HP_BIND_NOW_COUNT, DT_PLT,
|
||||
DT_PLT_SIZE, DT_DLT, DT_DLT_SIZE, DT_HP_BIND_DEPTH_FIRST, DT_HP_GST,
|
||||
DT_HP_SHLIB_FIXED, DT_HP_MERGE_SHLIB_SEG, DT_HP_NODELETE, DT_HP_GROUP,
|
||||
DT_HP_PROTECT_LINKAGE_TABLE, PT_HP_OPT_ANNOT, PT_HP_HSL_ANNOT,
|
||||
PT_HP_STACK, PT_HP_CORE_UTSNAME, NT_HP_COMPILER, NT_HP_COPYRIGHT,
|
||||
NT_HP_VERSION, NT_HP_SRCFILE_INFO, NT_HP_LINKER, NT_HP_INSTRUMENTED,
|
||||
NT_HP_UX_OPTIONS): Define.
|
||||
|
||||
2005-07-25 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* m32c.h: Add R_M32C_8, R_M32C_LO16, R_M32C_HI8, and R_M32C_HI16.
|
||||
|
||||
2005-07-25 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* x86-64.h (SHN_X86_64_LCOMMON): New.
|
||||
(SHF_X86_64_LARGE): New.
|
||||
|
||||
2005-07-20 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
|
||||
|
||||
* m32r.h (R_M32R_REL32): Added.
|
||||
|
||||
2005-07-18 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* dwarf2.h (enum dwarf_type): Remove DW_AT_GNU_decimal_float.
|
||||
Replace with DW_ATE_decimal_float (now in DWARF 3).
|
||||
|
||||
2005-07-14 Jim Blandy <jimb@redhat.com>
|
||||
|
||||
Add support for Renesas M32C and M16C.
|
||||
* common.h (EM_M32C): New machine number.
|
||||
* m32c.h: New file.
|
||||
|
||||
2005-06-17 Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
* x86-64.h (elf_x86_64_reloc_type): Adjust comment for
|
||||
R_X86_64_GOTPCREL. Add R_X86_64_PC64, R_X86_64_GOTOFF64, and
|
||||
R_X86_64_GOTPC32.
|
||||
|
||||
2005-06-07 Aldy Hernandez <aldyh@redhat.com>
|
||||
Michael Snyder <msnyder@redhat.com>
|
||||
Stan Cox <scox@redhat.com>
|
||||
|
||||
* common.h (EM_MS1): Define.
|
||||
|
||||
* ms1.h: New file.
|
||||
|
||||
2005-05-31 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* alpha.h (LITUSE_ALPHA_JSRDIRECT): New.
|
||||
|
||||
2005-05-29 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* alpha.h (DT_ALPHA_PLTRO): New.
|
||||
|
||||
2005-05-19 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* dwarf2.h (enum dwarf_type): Assign DW_ATE_GNU_decimal_float from
|
||||
the user-defined encoding space pending inclusion in the standard.
|
||||
|
||||
2005-05-18 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* arm.h: Make all #ifndef OLD_ARM_ABI blocks
|
||||
unconditional, delete all #ifdef OLD_ARM_ABI blocks.
|
||||
|
||||
2005-05-17 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* arm.h: Import complete list of official relocation names
|
||||
and numbers from AAELF. Define FAKE_RELOCs for old names.
|
||||
Remove a few old names no longer used anywhere.
|
||||
|
||||
2005-05-14 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ppc.h (DT_PPC_GOT): Rename from DT_PPC_GLINK.
|
||||
|
||||
2005-05-11 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ppc.h (R_PPC_RELAX32, R_PPC_RELAX32PC, R_PPC_RELAX32_PLT,
|
||||
R_PPC_RELAX32PC_PLT) Adjust.
|
||||
(R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI, R_PPC_REL16_HA): Define.
|
||||
(DT_PPC_GLINK): Define.
|
||||
|
||||
2005-05-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* Update the address and phone number of the FSF organization in
|
||||
the GPL notices in the following files:
|
||||
alpha.h, arc.h, arm.h, avr.h, common.h, cr16c.h, cris.h, crx.h,
|
||||
d10v.h, d30v.h, dlx.h, dwarf.h, dwarf2.h, external.h, fr30.h,
|
||||
frv.h, h8.h, hppa.h, i370.h, i386.h, i860.h, i960.h, ia64.h,
|
||||
internal.h, ip2k.h, iq2000.h, m32r.h, m68hc11.h, m68k.h, mcore.h,
|
||||
mips.h, mmix.h, mn10200.h, mn10300.h, msp430.h, openrisc.h,
|
||||
or32.h, pj.h, ppc.h, ppc64.h, reloc-macros.h, s390.h, sh.h,
|
||||
sparc.h, v850.h, vax.h, x86-64.h, xstormy16.h, xtensa.h
|
||||
|
||||
2005-04-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
Moved from ../ChangeLog
|
||||
|
||||
2004-10-27 Richard Earnshaw <rearnsha@arm.com>
|
||||
* arm.h: Add R_ARM_CALL and R_ARM_JUMP32.
|
||||
|
||||
2004-10-12 Paul Brook <paul@codesourcery.com>
|
||||
* arm.h (EF_ARM_EABI_VER4): Define.
|
||||
|
||||
2004-10-08 Daniel Jacobowitz <dan@debian.org>
|
||||
|
||||
* common.h (PT_SUNW_EH_FRAME): Define.
|
||||
* x86-64.h (SHT_X86_64_UNWIND): Define.
|
||||
|
||||
2004-10-07 Bob Wilson <bob.wilson@acm.org>
|
||||
* xtensa.h (R_XTENSA_DIFF8, R_XTENSA_DIFF16, R_XTENSA_DIFF32,
|
||||
R_XTENSA_SLOT*_OP, R_XTENSA_SLOT*_ALT): New relocations.
|
||||
(XTENSA_PROP_SEC_NAME): Define.
|
||||
(property_table_entry): Add flags field.
|
||||
(XTENSA_PROP_*, GET_XTENSA_PROP_*, SET_XTENSA_PROP_*): Define.
|
||||
|
||||
2004-09-17 Paul Brook <paul@codesourcery.com>
|
||||
* arm.h: Remove R_ARM_STKCHK and R_ARM_THM_STKCHK.
|
||||
Add R_ARM_TARGET2, R_ARM_PREL31, R_ARM_GOT_ABS, R_ARM_GOT_PREL,
|
||||
R_ARM_GOT_BREL12, R_ARM_GOTOFF12 and R_ARM_GOTRELAX.
|
||||
|
||||
2004-09-13 Paul Brook <paul@codesourcery.com>
|
||||
* arm.h: Rename RELABS to TARGET1.
|
||||
|
||||
2004-05-11 Jakub Jelinek <jakub@redhat.com>
|
||||
* common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
|
||||
(PT_GNU_RELRO): Define.
|
||||
|
||||
2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
Phil Blundell <philb@gnu.org>
|
||||
|
||||
* arm.h: Add TLS relocations.
|
||||
|
||||
2005-03-23 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* dwarf.h: Merge with GCC's dwarf.h.
|
||||
|
||||
2005-03-18 C Jaipraash <cjaiprakash@noida.hcltech.com>
|
||||
|
||||
* m68k.h (EF_CFV4E): Define.
|
||||
|
||||
2005-03-17 Paul Brook <paul@codesourcery.com>
|
||||
Dan Jacobowitz <dan@codesourcery.com>
|
||||
Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* arm.h (PT_ARM_EXIDX): Define.
|
||||
|
||||
2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* mips.h: Define MIPS TLS relocations.
|
||||
|
||||
2005-02-15 Nigel Stephens <nigel@mips.com>
|
||||
Maciej W. Rozycki <macro@mips.com>
|
||||
|
||||
* mips.h (R_MIPS16_GOT16): New reloc code.
|
||||
(R_MIPS16_CALL16): Likewise.
|
||||
(R_MIPS16_HI16): Likewise.
|
||||
(R_MIPS16_LO16): Likewise.
|
||||
(R_MIPS16_min): New fake reloc code.
|
||||
(R_MIPS16_max): Likewise.
|
||||
|
||||
2005-02-11 Maciej W. Rozycki <macro@mips.com>
|
||||
|
||||
* mips.h (R_MIPS_max): Use FAKE_RELOC to define.
|
||||
|
||||
2005-01-25 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
2004-12-10 Alexandre Oliva <aoliva@redhat.com>
|
||||
* frv.h: Add R_FRV_TLSMOFF.
|
||||
2004-11-10 Alexandre Oliva <aoliva@redhat.com>
|
||||
* frv.h: Add TLS relocations.
|
||||
|
||||
2005-01-17 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* sh.h (EF_SH2A_SH4_NOFPU, EF_SH2A_SH3_NOFPU, EF_SH2A_SH4,
|
||||
EF_SH2A_SH3E): New flags.
|
||||
(EF_SH_BFD_TABLE): Add these new flags to the table.
|
||||
|
||||
2005-01-12 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ppc.h (R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Define.
|
||||
(R_PPC_RELAX32, R_PPC_RELAX32PC): Adjust value.
|
||||
|
||||
2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
|
||||
|
||||
* avr.h (R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW): New relocs.
|
||||
|
||||
2004-12-16 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
* v850.h (R_V850_LO16_SPLIT_OFFSET): New reloc.
|
||||
|
||||
2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
|
||||
|
||||
* mips.h (E_MIPS_MACH_9000): Define.
|
||||
|
||||
2004-11-04 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
* cris.h (EF_CRIS_VARIANT_MASK, EF_CRIS_VARIANT_ANY_V0_V10)
|
||||
(EF_CRIS_VARIANT_V32, EF_CRIS_VARIANT_COMMON_V10_V32): New
|
||||
macros.
|
||||
|
||||
2004-10-06 Eric Christopher <echristo@redhat.com>
|
||||
|
||||
* dwarf2.h: Sync with gcc dwarf2.h. Fix typo.
|
||||
|
||||
2004-10-01 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* arm.h (SHT_ARM_EXIDX): Define.
|
||||
(ELF_STRING_ARM_unwind, ELF_STRING_ARM_unwind,
|
||||
ELF_STRING_ARM_unwind_once, ELF_STRING_ARM_unwind_info_once):
|
||||
Define.
|
||||
|
||||
2004-08-25 Dmitry Diky <diwil@spec.ru>
|
||||
|
||||
* msp430.h: Add new relocs.
|
||||
|
||||
2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* i386.h (R_386_USED_BY_INTEL_200): New.
|
||||
|
||||
2004-07-29 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
Introduce SH2a support.
|
||||
2004-02-18 Corinna Vinschen <vinschen@redhat.com>
|
||||
* sh.h (EF_SH2A_NOFPU): New.
|
||||
2003-12-01 Michael Snyder <msnyder@redhat.com>
|
||||
* sh.h (EF_SH2A): New.
|
||||
|
||||
2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
|
||||
|
||||
* crx.h: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
|
||||
BFD_RELOC_CRX_SWITCH32.
|
||||
|
||||
2004-07-06 Tomer Levi <Tomer.Levi@nsc.com>
|
||||
|
||||
* common.h (EM_CRX): Define.
|
||||
* crx.h: New file.
|
||||
|
||||
2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
|
||||
|
||||
* m32r.h: Add defintions of R_M32R_GOTOFF_HI_ULO,
|
||||
R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
|
||||
|
||||
2004-06-19 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* common.h (ELF64_R_INFO): Warning fix.
|
||||
|
||||
2004-06-14 Chris Demetriou <cgd@broadcom.com>
|
||||
|
||||
* mips.h (R_MIPS_PC32): Add back (undoing removal on 2004-04-24),
|
||||
with an updated comment.
|
||||
|
||||
2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
|
||||
|
||||
* sh.h (EF_SH_HAS_DSP): Remove.
|
||||
(EF_SH_HAS_FP): Remove.
|
||||
(EF_SH_MERGE_MACH): Remove.
|
||||
(EF_SH4_NOFPU): Convert to decimal.
|
||||
(EF_SH4A_NOFPU): Likewise.
|
||||
(EF_SH4_NOMMU_NOFPU): Likewise.
|
||||
(EF_SH3_NOMMU): Add new macro.
|
||||
(EF_SH_BFD_TABLE): Likewise.
|
||||
(sh_find_elf_flags): Add prototype.
|
||||
(sh_elf_get_flags_from_mach): Likewise.
|
||||
|
||||
2004-04-24 Chris Demetriou <cgd@broadcom.com>
|
||||
|
||||
* mips.h (R_MIPS_PC32, R_MIPS_PC64, R_MIPS_GNU_REL_LO16)
|
||||
(R_MIPS_GNU_REL_HI16): Remove.
|
||||
(R_MIPS_GNU_REL16_S2): Update comment.
|
||||
|
||||
2004-30-30 Galit Heller <Galit.Heller@nsc.com>
|
||||
Tomer Levi <Tomer.Levi@nsc.com>
|
||||
|
||||
* common.h (EM_CR): Define.
|
||||
* cr16c.h: New file.
|
||||
|
||||
2004-03-23 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* arm.h (EF_ERM_BE8, EF_ARM_LE8, EF_ARM_EABI_VER3): Add.
|
||||
|
||||
2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
|
||||
|
||||
* sh.h: Add EF_SH4_NOMMU_NOFPU.
|
||||
|
||||
2004-03-01 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
* frv.h (EF_FRV_CPU_FR405, EF_FRV_CPU_FR450): Define.
|
||||
|
||||
2004-01-28 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* common.h (AT_SECURE): New macro.
|
||||
|
||||
2004-01-21 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* common.h (AT_SUN_UID, AT_SUN_RUID, AT_SUN_GID): New macros.
|
||||
(AT_SUN_RGID, AT_SUN_LDELF, AT_SUN_LDSHDR, AT_SUN_LDNAME,
|
||||
AT_SUN_LPAGESZ, AT_SUN_PLATFORM, AT_SUN_HWCAP, AT_SUN_IFLUSH,
|
||||
AT_SUN_CPU, AT_SUN_EMUL_ENTRY, AT_SUN_EMUL_EXECFD,
|
||||
AT_SUN_EXECNAME) AT_SUN_MMU, AT_SUN_LDDATA): Likewise.
|
||||
|
||||
2004-01-17 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* common.h (NT_OPENBSD_IDENT): Define.
|
||||
|
||||
2004-01-06 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
2003-09-18 Alexandre Oliva <aoliva@redhat.com>
|
||||
* frv.h (EF_FRV_FDPIC): New macro.
|
||||
(EF_FRV_PIC_FLAGS): Adjust.
|
||||
2003-08-08 Alexandre Oliva <aoliva@redhat.com>
|
||||
* frv.h (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
|
||||
R_FRV_FUNCDESC_GOTOFFLO, R_FRV_FUNCDESC_GOTOFFHI, R_FRV_GOTOFF12,
|
||||
R_FRV_GOTOFFLO, R_FRV_GOTOFFHI): New.
|
||||
2003-08-04 Alexandre Oliva <aoliva@redhat.com>
|
||||
* frv.h (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO, R_FRV_FUNCDESC,
|
||||
R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI, R_FRV_FUNCDESC_GOTLO):
|
||||
New.
|
||||
|
||||
|
||||
For older changes see ChangeLog-9103
|
||||
|
||||
Local Variables:
|
||||
mode: change-log
|
||||
left-margin: 8
|
||||
fill-column: 74
|
||||
version-control: never
|
||||
End:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,130 +0,0 @@
|
||||
/* ALPHA ELF support for BFD.
|
||||
Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
By Eric Youngdale, <eric@aib.com>. No processor supplement available
|
||||
for this platform.
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* This file holds definitions specific to the ALPHA ELF ABI. Note
|
||||
that most of this is not actually implemented by BFD. */
|
||||
|
||||
#ifndef _ELF_ALPHA_H
|
||||
#define _ELF_ALPHA_H
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
|
||||
/* All addresses must be below 2GB. */
|
||||
#define EF_ALPHA_32BIT 0x00000001
|
||||
|
||||
/* All relocations needed for relaxation with code movement are present. */
|
||||
#define EF_ALPHA_CANRELAX 0x00000002
|
||||
|
||||
/* Processor specific section flags. */
|
||||
|
||||
/* This section must be in the global data area. */
|
||||
#define SHF_ALPHA_GPREL 0x10000000
|
||||
|
||||
/* Section contains some sort of debugging information. The exact
|
||||
format is unspecified. It's probably ECOFF symbols. */
|
||||
#define SHT_ALPHA_DEBUG 0x70000001
|
||||
|
||||
/* Section contains register usage information. */
|
||||
#define SHT_ALPHA_REGINFO 0x70000002
|
||||
|
||||
/* A section of type SHT_MIPS_REGINFO contains the following
|
||||
structure. */
|
||||
typedef struct
|
||||
{
|
||||
/* Mask of general purpose registers used. */
|
||||
unsigned long ri_gprmask;
|
||||
/* Mask of co-processor registers used. */
|
||||
unsigned long ri_cprmask[4];
|
||||
/* GP register value for this object file. */
|
||||
long ri_gp_value;
|
||||
} Elf64_RegInfo;
|
||||
|
||||
/* Special values for the st_other field in the symbol table. */
|
||||
|
||||
#define STO_ALPHA_NOPV 0x80
|
||||
#define STO_ALPHA_STD_GPLOAD 0x88
|
||||
|
||||
/* Special values for Elf64_Dyn tag. */
|
||||
#define DT_ALPHA_PLTRO DT_LOPROC
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Alpha relocs. */
|
||||
START_RELOC_NUMBERS (elf_alpha_reloc_type)
|
||||
RELOC_NUMBER (R_ALPHA_NONE, 0) /* No reloc */
|
||||
RELOC_NUMBER (R_ALPHA_REFLONG, 1) /* Direct 32 bit */
|
||||
RELOC_NUMBER (R_ALPHA_REFQUAD, 2) /* Direct 64 bit */
|
||||
RELOC_NUMBER (R_ALPHA_GPREL32, 3) /* GP relative 32 bit */
|
||||
RELOC_NUMBER (R_ALPHA_LITERAL, 4) /* GP relative 16 bit w/optimization */
|
||||
RELOC_NUMBER (R_ALPHA_LITUSE, 5) /* Optimization hint for LITERAL */
|
||||
RELOC_NUMBER (R_ALPHA_GPDISP, 6) /* Add displacement to GP */
|
||||
RELOC_NUMBER (R_ALPHA_BRADDR, 7) /* PC+4 relative 23 bit shifted */
|
||||
RELOC_NUMBER (R_ALPHA_HINT, 8) /* PC+4 relative 16 bit shifted */
|
||||
RELOC_NUMBER (R_ALPHA_SREL16, 9) /* PC relative 16 bit */
|
||||
RELOC_NUMBER (R_ALPHA_SREL32, 10) /* PC relative 32 bit */
|
||||
RELOC_NUMBER (R_ALPHA_SREL64, 11) /* PC relative 64 bit */
|
||||
|
||||
/* Skip 12 - 16; deprecated ECOFF relocs. */
|
||||
|
||||
RELOC_NUMBER (R_ALPHA_GPRELHIGH, 17) /* GP relative 32 bit, high 16 bits */
|
||||
RELOC_NUMBER (R_ALPHA_GPRELLOW, 18) /* GP relative 32 bit, low 16 bits */
|
||||
RELOC_NUMBER (R_ALPHA_GPREL16, 19) /* GP relative 16 bit */
|
||||
|
||||
/* Skip 20 - 23; deprecated ECOFF relocs. */
|
||||
|
||||
/* These relocations are specific to shared libraries. */
|
||||
RELOC_NUMBER (R_ALPHA_COPY, 24) /* Copy symbol at runtime */
|
||||
RELOC_NUMBER (R_ALPHA_GLOB_DAT, 25) /* Create GOT entry */
|
||||
RELOC_NUMBER (R_ALPHA_JMP_SLOT, 26) /* Create PLT entry */
|
||||
RELOC_NUMBER (R_ALPHA_RELATIVE, 27) /* Adjust by program base */
|
||||
|
||||
/* Like BRADDR, but assert that the source and target object file
|
||||
share the same GP value, and adjust the target address for
|
||||
STO_ALPHA_STD_GPLOAD. */
|
||||
RELOC_NUMBER (R_ALPHA_BRSGP, 28)
|
||||
|
||||
/* Thread-Local Storage. */
|
||||
RELOC_NUMBER (R_ALPHA_TLSGD, 29)
|
||||
RELOC_NUMBER (R_ALPHA_TLSLDM, 30)
|
||||
RELOC_NUMBER (R_ALPHA_DTPMOD64, 31)
|
||||
RELOC_NUMBER (R_ALPHA_GOTDTPREL, 32)
|
||||
RELOC_NUMBER (R_ALPHA_DTPREL64, 33)
|
||||
RELOC_NUMBER (R_ALPHA_DTPRELHI, 34)
|
||||
RELOC_NUMBER (R_ALPHA_DTPRELLO, 35)
|
||||
RELOC_NUMBER (R_ALPHA_DTPREL16, 36)
|
||||
RELOC_NUMBER (R_ALPHA_GOTTPREL, 37)
|
||||
RELOC_NUMBER (R_ALPHA_TPREL64, 38)
|
||||
RELOC_NUMBER (R_ALPHA_TPRELHI, 39)
|
||||
RELOC_NUMBER (R_ALPHA_TPRELLO, 40)
|
||||
RELOC_NUMBER (R_ALPHA_TPREL16, 41)
|
||||
|
||||
END_RELOC_NUMBERS (R_ALPHA_max)
|
||||
|
||||
#define LITUSE_ALPHA_ADDR 0
|
||||
#define LITUSE_ALPHA_BASE 1
|
||||
#define LITUSE_ALPHA_BYTOFF 2
|
||||
#define LITUSE_ALPHA_JSR 3
|
||||
#define LITUSE_ALPHA_TLSGD 4
|
||||
#define LITUSE_ALPHA_TLSLDM 5
|
||||
#define LITUSE_ALPHA_JSRDIRECT 6
|
||||
|
||||
#endif /* _ELF_ALPHA_H */
|
||||
@@ -1,56 +0,0 @@
|
||||
/* ARC ELF support for BFD.
|
||||
Copyright 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
Contributed by Doug Evans, (dje@cygnus.com)
|
||||
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* This file holds definitions specific to the ARC ELF ABI. */
|
||||
|
||||
#ifndef _ELF_ARC_H
|
||||
#define _ELF_ARC_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocations. */
|
||||
|
||||
START_RELOC_NUMBERS (elf_arc_reloc_type)
|
||||
RELOC_NUMBER (R_ARC_NONE, 0)
|
||||
RELOC_NUMBER (R_ARC_32, 1)
|
||||
RELOC_NUMBER (R_ARC_B26, 2)
|
||||
RELOC_NUMBER (R_ARC_B22_PCREL, 3)
|
||||
END_RELOC_NUMBERS (R_ARC_max)
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
|
||||
/* Four bit ARC machine type field. */
|
||||
|
||||
#define EF_ARC_MACH 0x0000000f
|
||||
|
||||
/* Various CPU types. */
|
||||
|
||||
#define E_ARC_MACH_ARC5 0
|
||||
#define E_ARC_MACH_ARC6 1
|
||||
#define E_ARC_MACH_ARC7 2
|
||||
#define E_ARC_MACH_ARC8 3
|
||||
|
||||
/* Leave bits 0xf0 alone in case we ever have more than 16 cpu types. */
|
||||
|
||||
/* File contains position independent code. */
|
||||
|
||||
#define EF_ARC_PIC 0x00000100
|
||||
|
||||
#endif /* _ELF_ARC_H */
|
||||
@@ -1,284 +0,0 @@
|
||||
/* ARM ELF support for BFD.
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef _ELF_ARM_H
|
||||
#define _ELF_ARM_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
#define EF_ARM_RELEXEC 0x01
|
||||
#define EF_ARM_HASENTRY 0x02
|
||||
#define EF_ARM_INTERWORK 0x04
|
||||
#define EF_ARM_APCS_26 0x08
|
||||
#define EF_ARM_APCS_FLOAT 0x10
|
||||
#define EF_ARM_PIC 0x20
|
||||
#define EF_ARM_ALIGN8 0x40 /* 8-bit structure alignment is in use. */
|
||||
#define EF_ARM_NEW_ABI 0x80
|
||||
#define EF_ARM_OLD_ABI 0x100
|
||||
#define EF_ARM_SOFT_FLOAT 0x200
|
||||
#define EF_ARM_VFP_FLOAT 0x400
|
||||
#define EF_ARM_MAVERICK_FLOAT 0x800
|
||||
|
||||
/* Frame unwind information */
|
||||
#define PT_ARM_EXIDX (PT_LOPROC + 1)
|
||||
|
||||
/* Other constants defined in the ARM ELF spec. version B-01. */
|
||||
#define EF_ARM_SYMSARESORTED 0x04 /* NB conflicts with EF_INTERWORK */
|
||||
#define EF_ARM_DYNSYMSUSESEGIDX 0x08 /* NB conflicts with EF_APCS26 */
|
||||
#define EF_ARM_MAPSYMSFIRST 0x10 /* NB conflicts with EF_APCS_FLOAT */
|
||||
#define EF_ARM_EABIMASK 0xFF000000
|
||||
|
||||
/* Constants defined in AAELF. */
|
||||
#define EF_ARM_BE8 0x00800000
|
||||
#define EF_ARM_LE8 0x00400000
|
||||
|
||||
#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
|
||||
#define EF_ARM_EABI_UNKNOWN 0x00000000
|
||||
#define EF_ARM_EABI_VER1 0x01000000
|
||||
#define EF_ARM_EABI_VER2 0x02000000
|
||||
#define EF_ARM_EABI_VER3 0x03000000
|
||||
#define EF_ARM_EABI_VER4 0x04000000
|
||||
#define EF_ARM_EABI_VER5 0x05000000
|
||||
|
||||
/* Local aliases for some flags to match names used by COFF port. */
|
||||
#define F_INTERWORK EF_ARM_INTERWORK
|
||||
#define F_APCS26 EF_ARM_APCS_26
|
||||
#define F_APCS_FLOAT EF_ARM_APCS_FLOAT
|
||||
#define F_PIC EF_ARM_PIC
|
||||
#define F_SOFT_FLOAT EF_ARM_SOFT_FLOAT
|
||||
#define F_VFP_FLOAT EF_ARM_VFP_FLOAT
|
||||
|
||||
/* Additional symbol types for Thumb. */
|
||||
#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
|
||||
#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
|
||||
|
||||
/* Additional section types. */
|
||||
#define SHT_ARM_EXIDX 0x70000001 /* Section holds ARM unwind info. */
|
||||
#define SHT_ARM_PREEMPTMAP 0x70000002 /* Section pre-emption details. */
|
||||
#define SHT_ARM_ATTRIBUTES 0x70000003 /* Section holds attributes. */
|
||||
|
||||
/* ARM-specific values for sh_flags. */
|
||||
#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */
|
||||
#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */
|
||||
|
||||
/* ARM-specific program header flags. */
|
||||
#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base. */
|
||||
#define PF_ARM_PI 0x20000000 /* Segment is position-independent. */
|
||||
#define PF_ARM_ABS 0x40000000 /* Segment must be loaded at its base address. */
|
||||
|
||||
/* Relocation types. */
|
||||
|
||||
START_RELOC_NUMBERS (elf_arm_reloc_type)
|
||||
/* AAELF official names and numbers. */
|
||||
RELOC_NUMBER (R_ARM_NONE, 0)
|
||||
RELOC_NUMBER (R_ARM_PC24, 1) /* deprecated */
|
||||
RELOC_NUMBER (R_ARM_ABS32, 2)
|
||||
RELOC_NUMBER (R_ARM_REL32, 3)
|
||||
RELOC_NUMBER (R_ARM_LDR_PC_G0, 4)
|
||||
RELOC_NUMBER (R_ARM_ABS16, 5)
|
||||
RELOC_NUMBER (R_ARM_ABS12, 6)
|
||||
RELOC_NUMBER (R_ARM_THM_ABS5, 7)
|
||||
RELOC_NUMBER (R_ARM_ABS8, 8)
|
||||
RELOC_NUMBER (R_ARM_SBREL32, 9)
|
||||
RELOC_NUMBER (R_ARM_THM_CALL, 10)
|
||||
RELOC_NUMBER (R_ARM_THM_PC8, 11)
|
||||
RELOC_NUMBER (R_ARM_BREL_ADJ, 12)
|
||||
RELOC_NUMBER (R_ARM_SWI24, 13) /* obsolete */
|
||||
RELOC_NUMBER (R_ARM_THM_SWI8, 14) /* obsolete */
|
||||
RELOC_NUMBER (R_ARM_XPC25, 15) /* obsolete */
|
||||
RELOC_NUMBER (R_ARM_THM_XPC22, 16) /* obsolete */
|
||||
RELOC_NUMBER (R_ARM_TLS_DTPMOD32, 17)
|
||||
RELOC_NUMBER (R_ARM_TLS_DTPOFF32, 18)
|
||||
RELOC_NUMBER (R_ARM_TLS_TPOFF32, 19)
|
||||
RELOC_NUMBER (R_ARM_COPY, 20) /* Copy symbol at runtime. */
|
||||
RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* Create GOT entry. */
|
||||
RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* Create PLT entry. */
|
||||
RELOC_NUMBER (R_ARM_RELATIVE, 23) /* Adjust by program base. */
|
||||
RELOC_NUMBER (R_ARM_GOTOFF32, 24) /* 32 bit offset to GOT. */
|
||||
RELOC_NUMBER (R_ARM_BASE_PREL, 25) /* 32 bit PC relative offset to GOT. */
|
||||
RELOC_NUMBER (R_ARM_GOT_BREL, 26) /* 32 bit GOT entry. */
|
||||
RELOC_NUMBER (R_ARM_PLT32, 27) /* deprecated - 32 bit PLT address. */
|
||||
RELOC_NUMBER (R_ARM_CALL, 28)
|
||||
RELOC_NUMBER (R_ARM_JUMP24, 29)
|
||||
RELOC_NUMBER (R_ARM_THM_JUMP24, 30)
|
||||
RELOC_NUMBER (R_ARM_BASE_ABS, 31)
|
||||
RELOC_NUMBER (R_ARM_ALU_PCREL7_0, 32) /* obsolete */
|
||||
RELOC_NUMBER (R_ARM_ALU_PCREL15_8, 33) /* obsolete */
|
||||
RELOC_NUMBER (R_ARM_ALU_PCREL23_15, 34) /* obsolete */
|
||||
RELOC_NUMBER (R_ARM_LDR_SBREL_11_0, 35) /* deprecated, should have _NC suffix */
|
||||
RELOC_NUMBER (R_ARM_ALU_SBREL_19_12, 36) /* deprecated, should have _NC suffix */
|
||||
RELOC_NUMBER (R_ARM_ALU_SBREL_27_20, 37) /* deprecated, should have _CK suffix */
|
||||
RELOC_NUMBER (R_ARM_TARGET1, 38)
|
||||
RELOC_NUMBER (R_ARM_SBREL31, 39) /* deprecated */
|
||||
RELOC_NUMBER (R_ARM_V4BX, 40)
|
||||
RELOC_NUMBER (R_ARM_TARGET2, 41)
|
||||
RELOC_NUMBER (R_ARM_PREL31, 42)
|
||||
RELOC_NUMBER (R_ARM_MOVW_ABS_NC, 43)
|
||||
RELOC_NUMBER (R_ARM_MOVT_ABS, 44)
|
||||
RELOC_NUMBER (R_ARM_MOVW_PREL_NC, 45)
|
||||
RELOC_NUMBER (R_ARM_MOVT_PREL, 46)
|
||||
RELOC_NUMBER (R_ARM_THM_MOVW_ABS_NC, 47)
|
||||
RELOC_NUMBER (R_ARM_THM_MOVT_ABS, 48)
|
||||
RELOC_NUMBER (R_ARM_THM_MOVW_PREL_NC, 49)
|
||||
RELOC_NUMBER (R_ARM_THM_MOVT_PREL, 50)
|
||||
RELOC_NUMBER (R_ARM_THM_JUMP19, 51)
|
||||
RELOC_NUMBER (R_ARM_THM_JUMP6, 52)
|
||||
RELOC_NUMBER (R_ARM_THM_ALU_PREL_11_0, 53)
|
||||
RELOC_NUMBER (R_ARM_THM_PC12, 54)
|
||||
RELOC_NUMBER (R_ARM_ABS32_NOI, 55)
|
||||
RELOC_NUMBER (R_ARM_REL32_NOI, 56)
|
||||
RELOC_NUMBER (R_ARM_ALU_PC_G0_NC, 57)
|
||||
RELOC_NUMBER (R_ARM_ALU_PC_G0, 58)
|
||||
RELOC_NUMBER (R_ARM_ALU_PC_G1_NC, 59)
|
||||
RELOC_NUMBER (R_ARM_ALU_PC_G1, 60)
|
||||
RELOC_NUMBER (R_ARM_ALU_PC_G2, 61)
|
||||
RELOC_NUMBER (R_ARM_LDR_PC_G1, 62)
|
||||
RELOC_NUMBER (R_ARM_LDR_PC_G2, 63)
|
||||
RELOC_NUMBER (R_ARM_LDRS_PC_G0, 64)
|
||||
RELOC_NUMBER (R_ARM_LDRS_PC_G1, 65)
|
||||
RELOC_NUMBER (R_ARM_LDRS_PC_G2, 66)
|
||||
RELOC_NUMBER (R_ARM_LDC_PC_G0, 67)
|
||||
RELOC_NUMBER (R_ARM_LDC_PC_G1, 68)
|
||||
RELOC_NUMBER (R_ARM_LDC_PC_G2, 69)
|
||||
RELOC_NUMBER (R_ARM_ALU_SB_G0_NC, 70)
|
||||
RELOC_NUMBER (R_ARM_ALU_SB_G0, 71)
|
||||
RELOC_NUMBER (R_ARM_ALU_SB_G1_NC, 72)
|
||||
RELOC_NUMBER (R_ARM_ALU_SB_G1, 73)
|
||||
RELOC_NUMBER (R_ARM_ALU_SB_G2, 74)
|
||||
RELOC_NUMBER (R_ARM_LDR_SB_G0, 75)
|
||||
RELOC_NUMBER (R_ARM_LDR_SB_G1, 76)
|
||||
RELOC_NUMBER (R_ARM_LDR_SB_G2, 77)
|
||||
RELOC_NUMBER (R_ARM_LDRS_SB_G0, 78)
|
||||
RELOC_NUMBER (R_ARM_LDRS_SB_G1, 79)
|
||||
RELOC_NUMBER (R_ARM_LDRS_SB_G2, 80)
|
||||
RELOC_NUMBER (R_ARM_LDC_SB_G0, 81)
|
||||
RELOC_NUMBER (R_ARM_LDC_SB_G1, 82)
|
||||
RELOC_NUMBER (R_ARM_LDC_SB_G2, 83)
|
||||
RELOC_NUMBER (R_ARM_MOVW_BREL_NC, 84)
|
||||
RELOC_NUMBER (R_ARM_MOVT_BREL, 85)
|
||||
RELOC_NUMBER (R_ARM_MOVW_BREL, 86)
|
||||
RELOC_NUMBER (R_ARM_THM_MOVW_BREL_NC, 87)
|
||||
RELOC_NUMBER (R_ARM_THM_MOVT_BREL, 88)
|
||||
RELOC_NUMBER (R_ARM_THM_MOVW_BREL, 89)
|
||||
/* 90-93 unallocated */
|
||||
RELOC_NUMBER (R_ARM_PLT32_ABS, 94)
|
||||
RELOC_NUMBER (R_ARM_GOT_ABS, 95)
|
||||
RELOC_NUMBER (R_ARM_GOT_PREL, 96)
|
||||
RELOC_NUMBER (R_ARM_GOT_BREL12, 97)
|
||||
RELOC_NUMBER (R_ARM_GOTOFF12, 98)
|
||||
RELOC_NUMBER (R_ARM_GOTRELAX, 99)
|
||||
RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100) /* deprecated - old C++ abi */
|
||||
RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101) /* deprecated - old C++ abi */
|
||||
RELOC_NUMBER (R_ARM_THM_JUMP11, 102)
|
||||
RELOC_NUMBER (R_ARM_THM_JUMP8, 103)
|
||||
RELOC_NUMBER (R_ARM_TLS_GD32, 104)
|
||||
RELOC_NUMBER (R_ARM_TLS_LDM32, 105)
|
||||
RELOC_NUMBER (R_ARM_TLS_LDO32, 106)
|
||||
RELOC_NUMBER (R_ARM_TLS_IE32, 107)
|
||||
RELOC_NUMBER (R_ARM_TLS_LE32, 108)
|
||||
RELOC_NUMBER (R_ARM_TLS_LDO12, 109)
|
||||
RELOC_NUMBER (R_ARM_TLS_LE12, 110)
|
||||
RELOC_NUMBER (R_ARM_TLS_IE12GP, 111)
|
||||
/* 112 - 127 private range */
|
||||
RELOC_NUMBER (R_ARM_ME_TOO, 128) /* obsolete */
|
||||
|
||||
/* Extensions? R=read-only? */
|
||||
RELOC_NUMBER (R_ARM_RXPC25, 249)
|
||||
RELOC_NUMBER (R_ARM_RSBREL32, 250)
|
||||
RELOC_NUMBER (R_ARM_THM_RPC22, 251)
|
||||
RELOC_NUMBER (R_ARM_RREL32, 252)
|
||||
RELOC_NUMBER (R_ARM_RABS32, 253)
|
||||
RELOC_NUMBER (R_ARM_RPC24, 254)
|
||||
RELOC_NUMBER (R_ARM_RBASE, 255)
|
||||
|
||||
/* Unofficial names for some of the relocs. */
|
||||
FAKE_RELOC (R_ARM_GOTOFF, R_ARM_GOTOFF32) /* 32 bit offset to GOT. */
|
||||
FAKE_RELOC (R_ARM_THM_PC22, R_ARM_THM_CALL)
|
||||
FAKE_RELOC (R_ARM_THM_PC11, R_ARM_THM_JUMP11)
|
||||
FAKE_RELOC (R_ARM_THM_PC9, R_ARM_THM_JUMP8)
|
||||
|
||||
/* Relocs with both a different name, and (apparently) different meaning in
|
||||
GNU usage. */
|
||||
FAKE_RELOC (R_ARM_GOTPC, R_ARM_BASE_PREL) /* 32 bit PC relative offset to GOT. */
|
||||
FAKE_RELOC (R_ARM_GOT32, R_ARM_GOT_BREL) /* 32 bit GOT entry. */
|
||||
FAKE_RELOC (R_ARM_ROSEGREL32, R_ARM_SBREL31) /* ??? */
|
||||
FAKE_RELOC (R_ARM_AMP_VCALL9, R_ARM_BREL_ADJ) /* Thumb-something. Not used. */
|
||||
END_RELOC_NUMBERS (R_ARM_max)
|
||||
|
||||
#ifdef BFD_ARCH_SIZE
|
||||
/* Routines for manipulating EABI object attributes. */
|
||||
void elf32_arm_add_eabi_attr_int (bfd *, int, unsigned int);
|
||||
void elf32_arm_add_eabi_attr_string (bfd *, int, const char *);
|
||||
void elf32_arm_add_eabi_attr_compat (bfd *, unsigned int, const char *);
|
||||
int elf32_arm_get_eabi_attr_int (bfd *, int);
|
||||
|
||||
void elf32_arm_set_eabi_attr_contents (bfd *, bfd_byte *, bfd_vma);
|
||||
bfd_vma elf32_arm_eabi_attr_size (bfd *);
|
||||
|
||||
enum
|
||||
{
|
||||
Tag_NULL,
|
||||
Tag_File,
|
||||
Tag_Section,
|
||||
Tag_Symbol,
|
||||
Tag_CPU_raw_name,
|
||||
Tag_CPU_name,
|
||||
Tag_CPU_arch,
|
||||
Tag_CPU_arch_profile,
|
||||
Tag_ARM_ISA_use,
|
||||
Tag_THUMB_ISA_use,
|
||||
Tag_VFP_arch,
|
||||
Tag_WMMX_arch,
|
||||
Tag_NEON_arch,
|
||||
Tag_PCS_config,
|
||||
Tag_ABI_PCS_R9_use,
|
||||
Tag_ABI_PCS_RW_data,
|
||||
Tag_ABI_PCS_RO_data,
|
||||
Tag_ABI_PCS_GOT_use,
|
||||
Tag_ABI_PCS_wchar_t,
|
||||
Tag_ABI_FP_rounding,
|
||||
Tag_ABI_FP_denormal,
|
||||
Tag_ABI_FP_exceptions,
|
||||
Tag_ABI_FP_user_exceptions,
|
||||
Tag_ABI_FP_number_model,
|
||||
Tag_ABI_align8_needed,
|
||||
Tag_ABI_align8_preserved,
|
||||
Tag_ABI_enum_size,
|
||||
Tag_ABI_HardFP_use,
|
||||
Tag_ABI_VFP_args,
|
||||
Tag_ABI_WMMX_args,
|
||||
Tag_ABI_optimization_goals,
|
||||
Tag_ABI_FP_optimization_goals,
|
||||
Tag_compatibility,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/* The name of the note section used to identify arm variants. */
|
||||
#define ARM_NOTE_SECTION ".note.gnu.arm.ident"
|
||||
|
||||
/* Special section names. */
|
||||
#define ELF_STRING_ARM_unwind ".ARM.exidx"
|
||||
#define ELF_STRING_ARM_unwind_info ".ARM.extab"
|
||||
#define ELF_STRING_ARM_unwind_once ".gnu.linkonce.armexidx."
|
||||
#define ELF_STRING_ARM_unwind_info_once ".gnu.linkonce.armextab."
|
||||
|
||||
#endif /* _ELF_ARM_H */
|
||||
@@ -1,70 +0,0 @@
|
||||
/* AVR ELF support for BFD.
|
||||
Copyright 1999, 2000, 2004, 2006 Free Software Foundation, Inc.
|
||||
Contributed by Denis Chertykov <denisc@overta.ru>
|
||||
|
||||
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.,
|
||||
51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef _ELF_AVR_H
|
||||
#define _ELF_AVR_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
#define EF_AVR_MACH 0xf
|
||||
|
||||
/* If bit #7 is set, it is assumed that the elf file uses local symbols
|
||||
as reference for the relocations so that linker relaxation is possible. */
|
||||
#define EF_AVR_LINKRELAX_PREPARED 0x80
|
||||
|
||||
#define E_AVR_MACH_AVR1 1
|
||||
#define E_AVR_MACH_AVR2 2
|
||||
#define E_AVR_MACH_AVR3 3
|
||||
#define E_AVR_MACH_AVR4 4
|
||||
#define E_AVR_MACH_AVR5 5
|
||||
#define E_AVR_MACH_AVR6 6
|
||||
|
||||
/* Relocations. */
|
||||
START_RELOC_NUMBERS (elf_avr_reloc_type)
|
||||
RELOC_NUMBER (R_AVR_NONE, 0)
|
||||
RELOC_NUMBER (R_AVR_32, 1)
|
||||
RELOC_NUMBER (R_AVR_7_PCREL, 2)
|
||||
RELOC_NUMBER (R_AVR_13_PCREL, 3)
|
||||
RELOC_NUMBER (R_AVR_16, 4)
|
||||
RELOC_NUMBER (R_AVR_16_PM, 5)
|
||||
RELOC_NUMBER (R_AVR_LO8_LDI, 6)
|
||||
RELOC_NUMBER (R_AVR_HI8_LDI, 7)
|
||||
RELOC_NUMBER (R_AVR_HH8_LDI, 8)
|
||||
RELOC_NUMBER (R_AVR_LO8_LDI_NEG, 9)
|
||||
RELOC_NUMBER (R_AVR_HI8_LDI_NEG, 10)
|
||||
RELOC_NUMBER (R_AVR_HH8_LDI_NEG, 11)
|
||||
RELOC_NUMBER (R_AVR_LO8_LDI_PM, 12)
|
||||
RELOC_NUMBER (R_AVR_HI8_LDI_PM, 13)
|
||||
RELOC_NUMBER (R_AVR_HH8_LDI_PM, 14)
|
||||
RELOC_NUMBER (R_AVR_LO8_LDI_PM_NEG, 15)
|
||||
RELOC_NUMBER (R_AVR_HI8_LDI_PM_NEG, 16)
|
||||
RELOC_NUMBER (R_AVR_HH8_LDI_PM_NEG, 17)
|
||||
RELOC_NUMBER (R_AVR_CALL, 18)
|
||||
RELOC_NUMBER (R_AVR_LDI, 19)
|
||||
RELOC_NUMBER (R_AVR_6, 20)
|
||||
RELOC_NUMBER (R_AVR_6_ADIW, 21)
|
||||
RELOC_NUMBER (R_AVR_MS8_LDI, 22)
|
||||
RELOC_NUMBER (R_AVR_MS8_LDI_NEG, 23)
|
||||
RELOC_NUMBER (R_AVR_LO8_LDI_GS, 24)
|
||||
RELOC_NUMBER (R_AVR_HI8_LDI_GS, 25)
|
||||
END_RELOC_NUMBERS (R_AVR_max)
|
||||
|
||||
#endif /* _ELF_AVR_H */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user