Home | History | Annotate | only in /src/usr.bin/elf2aout
History log of /src/usr.bin/elf2aout
RevisionDateAuthorComments
 1.13 01-Jan-2019  martin Match all arm (and simplify powerpc conditionals)
 1.12 31-Dec-2018  christos Update usage comments, add arm
 1.11 06-Mar-2016  christos branches: 1.11.14; 1.11.16;
PR/50897: David Binderman: fix memory leaks. While here, modernize error
handling, and types.
 1.10 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.9 18-Jul-2013  matt Use ${MACHINE_CPU} == "m68k"
 1.8 30-Mar-2010  mrg branches: 1.8.6; 1.8.12; 1.8.16;
build elf2aout and fdformat on macppc64 (for now, it's a lot easier than
figuring out how to split the sets... but that will have to happen.)

fixes the first easy part of PR#43075.
 1.7 12-Aug-2009  matt Don't build for MIPS anymore
 1.6 22-Mar-2002  fredette branches: 1.6.48;
Build elf2aout on m68000.
 1.5 21-May-2000  is Build on m68k and powerpc: needed for amigappc kernel with old boot loader.
 1.4 09-Jun-1999  simonb Only build binaries on mipse? systems, but build man pages on everything.
 1.3 09-Jan-1997  tls RCS ID police
 1.2 29-Sep-1996  jonathan Fix Makefile boilerplate:
Use elfstrip to strip itself only in elfstrip, not elf2aout or elf2ecoff.
 1.1 29-Sep-1996  jonathan Commit minimal Makefiles and man pages for ELf toolchain utilties
elf2aout, elf2ecoff, elfstrip
 1.6.48.1 26-Aug-2009  matt Teach crunchhide about mips64.
Make elf2ecoff for mips64 too.
never make elf2aout anymore.
Don't make ATF stuff if MKATF is no.
 1.8.16.1 23-Jul-2013  riastradh sync with HEAD
 1.8.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.11.16.1 10-Jun-2019  christos Sync with HEAD
 1.11.14.1 18-Jan-2019  pgoyette Synch with HEAD
 1.11 18-May-2019  christos - add flag to produce OMAGIC
- factor out complicated inline code into simpler functions
- add options parsing
 1.10 05-Mar-2012  njoly branches: 1.10.32;
Remove dead xrefs to obsolete kvm_mkdb(8).
 1.9 25-Feb-2003  wiz branches: 1.9.56;
.Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.8 30-Sep-2002  grant New sentence, new line.
 1.7 01-Dec-2001  wiz Sort sections, sort SEE ALSO, drop some .Pps.
 1.6 05-Jul-2000  msaitoh remove extra period in SEE ALL section
 1.5 22-Mar-1999  garbled More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.4 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.3 09-Jan-1998  perry RCS Id Police.
 1.2 18-Oct-1997  lukem WARNSify, fix .Nm usage
 1.1 29-Sep-1996  jonathan Commit minimal Makefiles and man pages for ELf toolchain utilties
elf2aout, elf2ecoff, elfstrip
 1.9.56.1 17-Apr-2012  yamt sync with head
 1.10.32.1 10-Jun-2019  christos Sync with HEAD
 1.25 01-Nov-2024  gutteridge elf2aout.c: switch to use htobe32(3)

As discussed on tech-toolchain. Tested with virt68k tools build on
Fedora 40. (Relevant to PR lib/58674.)
 1.24 28-Oct-2024  kre Include <arpa/inet.h> for htonl() (From Jan-Benedict Glaw)

Probably this should be using htobe32() instead of htonl()
(and so <endian.h> rather than <arpa/inet.h>) as there is
no sign of any network anywhere near here. But that's for
another day, and to be done by someone who can test it.

XXX pullup -10
 1.23 19-May-2019  wiz branches: 1.23.10; 1.23.12;
Sort options in usage.
 1.22 18-May-2019  christos - add flag to produce OMAGIC
- factor out complicated inline code into simpler functions
- add options parsing
 1.21 27-Apr-2019  skrll Fix build on ppc64
 1.20 26-Apr-2019  skrll A couple of fixes so that NetBSD/cats builds (on linux), works, and
produces a symbol table that is readable (by 4.4BSD nm(1) at least)

- Change from OMAGIC to ZMAGIC
- Resize the a.out string table if we run out of space.
- output symbol table size as int32_t (the code already assumes no 64bit
a.out.
 1.19 07-Mar-2016  martin branches: 1.19.16;
Gcc, please shut up with those stupid warnings!
 1.18 07-Mar-2016  martin Try to fix build on 32bit architectures.
 1.17 06-Mar-2016  christos PR/50897: David Binderman: fix memory leaks. While here, modernize error
handling, and types.
 1.16 06-Mar-2016  martin David Binderman in PR bin/50897: fix memory leak.
 1.15 10-Jul-2011  tsutsui Make this cross-tool ready. Mostly taken from elf2ecoff(1).

XXX: assume no LP64 a.out binaries
 1.14 10-Jul-2011  tsutsui Set a_midmag MAGIC in a.out header properly for more possible a.out ports
in the past per ex.e_machine in ELF header.
 1.13 28-Jun-2011  tsutsui ANSIfy, de-__P(), KNF, misc cosmetics.
 1.12 18-Apr-2009  dogcow Fix sign/unsigned and discards qualifiers. Based on patch by mlelstv.
 1.11 23-Apr-2004  simonb branches: 1.11.36;
s/the the/to the/.
 1.10 13-Mar-2000  soren Fix doubled 'the's.
 1.9 11-Jan-2000  is new symbol names for former Elf_xxx
 1.8 09-Jan-2000  is Make this also work for PowerPC targets.
 1.7 02-Nov-1999  drochner make it compile after ELF definition changes
 1.6 27-Nov-1998  simonb branches: 1.6.4;
Truncate the output file before writing to it, and silence the verbose
output.
 1.5 18-Oct-1997  lukem WARNSify, fix .Nm usage
 1.4 09-Jan-1997  tls RCS ID police
 1.3 16-Oct-1996  jonathan Rework to compile with <sys/exec_elf.h>.
 1.2 29-Sep-1996  jonathan Add RCS id lines to Ted Lemon's original code.
Update elf2ecoff to compile against NetBSD-1.2 distribtion ECOFF headers.
 1.1 29-Sep-1996  jonathan Import Ted Lemon's ELF toolchain utilties used to build kernels
for the pmax port in NetBSD 1.1 and 1.2.
 1.6.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.36.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.19.16.1 10-Jun-2019  christos Sync with HEAD
 1.23.12.1 02-Aug-2025  perseant Sync with HEAD
 1.23.10.2 15-Dec-2024  martin Pull up following revision(s) (requested by gutteridge in ticket #1019):

sys/arch/hppa/stand/mkboot/mkboot.c: revision 1.5
sys/arch/powerpc/stand/mkbootimage/mkbootimage.c: revision 1.21
usr.bin/elf2aout/elf2aout.c: revision 1.25

mkboot.c: ensure all functions are declared

Addresses build failure issue on current Linux distros that have a GCC
with implicit-function-declaration baked in as an error. Use be32toh(3)
instead of ntohl(3), seems to make more sense stylistically. Build
tested on Fedora 40.

Issue reported by Jan-Benedict Glaw. Also relevant to PR lib/58674.


elf2aout.c: switch to use htobe32(3)

As discussed on tech-toolchain. Tested with virt68k tools build on
Fedora 40. (Relevant to PR lib/58674.)


mkbootimage.c: consistently use sa_htobe32(2)

There were 38 calls to sa_htobe32(2) and two to htonl(3), mixed even
within the same function, with arpa/inet.h not included. (It's unclear
why this varied, as the original version of this file first checked in
included this discrepancy.)

Addresses build failure issue on current Linux distros that have a GCC
with implicit-function-declaration baked in as an error. Build tested
on Fedora 40.

Issue reported by Jan-Benedict Glaw. Also relevant to PR lib/58674.
 1.23.10.1 17-Nov-2024  martin Pull up following revision(s) (requested by kre in ticket #1004):

tools/compat/configure: revision 1.106
lib/libc/string/__strsignal.c: revision 1.26
tools/compat/configure.ac: revision 1.108
tools/compat/nbtool_config.h.in: revision 1.57
usr.bin/elf2aout/elf2aout.c: revision 1.24
tools/compat/Makefile: revision 1.93
sys/arch/macppc/stand/fixcoff/fixcoff.c: revision 1.13
tools/compat/compat_defs.h: revision 1.123

Include <arpa/inet.h> for htonl() (From Jan-Benedict Glaw)
Probably this should be using htobe32() instead of htonl()
(and so <endian.h> rather than <arpa/inet.h>) as there is
no sign of any network anywhere near here. But that's for
another day, and to be done by someone who can test it.

Portability fixes from Jan-Benedict Glaw
The args to help() and usage() need to be const char *
and main() should be declared as returning int.

Add shquote to libnbcompat
Include shquote() in configure tests
Regen for added shquote()

Stop attempting to return a (char*) in place of (const char *)
This removes a cast that was added in 1994, when __strsignal()
returned a char * to convert the const char * element of sys_siglist
into a type that matched.

It should have been removed when __strsignal() was changed to
return const char * in 1998. But wasn't.

This should fix an inane warning (treated as an error) from a
compile stupid enough to allow a natural char * (as in char buf[N])
to be returned as a result (which is, of course, fine), but complains
about returning (char *) applied to a (const char *).

RSS XML Feed