Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-11] src/usr.bin/elf2ecoff
Module Name: src
Committed By: martin
Date: Thu Jan 22 20:20:29 UTC 2026
Modified Files:
src/usr.bin/elf2ecoff [netbsd-11]: elf2ecoff.c
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #156):
usr.bin/elf2ecoff/elf2ecoff.c: revision 1.40
usr.bin/elf2ecoff/elf2ecoff.c: revision 1.41
usr.bin/elf2ecoff/elf2ecoff.c: revision 1.39
elf2ecoff: fix various incorrect byteswap ops
- make sure to use host byte order in debug printfs
- fix incorrect byte swap ops for struct ecoff32_symhdr using
bswap32_region() (only first two magic and vstamp members are int16_t)
- make sure to use proper host's endian to calclate symbol table size
- don't do byteswap unconditionally for struct ecoff_extsym
(especially on building as a native tool)
Patch from Steve Rumble on port-mips@:
https://mail-index.netbsd.org/port-mips/2025/12/06/msg001544.html
elf2ecoff: remove an incorrect but unused assigment to ecoff32_exechdr
Probably harmless but confusing on endiannes sanity check.
Maybe we should rather do byteswap during writing to an output file..
elf2ecoff: fix one more incorrect but harmless byteswap botch
Don't pass swapped ecoff32_exechdr to ECOFF32_SEGMENT_ALIGNMENT().
ECOFF32_SEGMENT_ALIGNMENT(ep) is defined as "((ep)->a.vstamp < 23 ? 8 : 16)"
so fortunately it always returns 16 even if a wrong byteorder value is
passed because we use fixed '.vstamp = 2 * 256 + 10' (2.10) here.
To generate a diff of this commit:
cvs rdiff -u -r1.36.2.1 -r1.36.2.2 src/usr.bin/elf2ecoff/elf2ecoff.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index