[PATCH 01/10] ld: Generate PDB string table
Alan Modra
amodra@gmail.com
Thu Dec 22 00:05:48 GMT 2022
On Fri, Dec 09, 2022 at 01:52:31AM +0000, Mark Harmstone wrote:
> Resubmitted patch set as per Nick's request.
The following is a show-stopper. Any target that doesn't have COFF
support enabled fails to build.
alpha-dec-vms ********make
arm-nacl ********make
csky-elf ********make
bfin-elf ********make
bpf-none ********make
am33_2.0-linux-gnu ********make
arm-vxworks ********make
cris-elf ********make
armeb-linux-gnueabi ********make
arm-netbsdelf ********make
arm-elf ********make
cr16-elf ********make
d10v-elf ********make
arm-nto ********make
arm-linux-gnueabi ********make
crx-elf ********make
arc-elf ********make
arc-linux-uclibc ********make
crisv32-linux-gnu ********make
avr-elf ********make
bfin-linux-uclibc ********make
csky-linux-gnu ********make
cris-linux-gnu ********make
aarch64_be-linux-gnu_ilp32 ********make
alpha-linux-gnuecoff check
alpha-unknown-freebsd4.7 OK
alpha-netbsd OK
arm-pe check
arm-wince-pe check
aarch64-elf OK
alpha-linux-gnu check
aarch64-linux-gnu OK
i386-msdos ********make
d30v-elf ********make
h8300-linux-gnu ********make
ip2k-elf ********make
fr30-elf ********make
hppa64-linux-gnu ********make
ft32-elf ********make
hppa-linux-gnu ********make
h8300-elf ********make
iq2000-elf ********make
i386-bsd ********make
i686-vxworks ********make
frv-linux-gnu ********make
hppa64-hp-hpux11.23 ********make
epiphany-elf ********make
dlx-elf ********make
frv-elf ********make
ia64-vms check
ia64-hpux check
hppa-hp-hpux10 OK
ia64-netbsd check
ia64-freebsd5 check
ia64-elf check
i386-go32 check
i686-pe OK
i386-darwin check
i686-pc-beos OK
i686-nto OK
i386-lynxos OK
i686-pc-elf OK
i586-linux-gnu OK
ia64-linux-gnu check
loongarch32-elf ********make
microblaze-linux-gnu ********make
mcore-elf ********make
microblaze-elf ********make
m32r-linux-gnu ********make
m68hc12-elf ********make
mep-elf ********make
msp430-elf ********make
m32r-elf ********make
m68k-linux-gnu ********make
m68hc11-elf ********make
mn10200-elf ********make
m32c-elf ********make
mn10300-elf ********make
moxie-elf ********make
metag-linux-gnu ********make
m68k-elf ********make
lm32-elf ********make
lm32-linux-gnu ********make
mmix ********make
mcore-pe check
mips-vxworks check
loongarch64-linux-gnu OK
mips64el-openbsd check
mips64-openbsd check
mipstx39-elf check
mipsisa32r2el-elf check
mips-sgi-irix6 check
mipsel-linux-gnu OK
mipsisa32el-linux-gnu OK
mips-linux-gnu check
mips64-linux-gnuabi64 check
pdp11-dec-aout ********make
nios2-linux-gnu ********make
ns32k-pc532-mach ********make
s12z-elf ********make
pru-elf ********make
ns32k-openbsd ********make
rx-elf ********make
nds32le-linux-gnu ********make
mt-elf ********make
riscv32-elf ********make
or1k-elf ********make
pj-elf ********make
rl78-elf ********make
nds32be-elf ********make
or1k-linux-gnu ********make
s390-linux-gnu ********make
riscv64-linux-gnu ********make
rs6000-aix5.1 check
rs6000-aix4.3.3 check
powerpc-aix5.1 check
rs6000-aix7.2 check
powerpc-aix7.2 check
powerpc-wrs-vxworks OK
powerpc-nto OK
powerpc-freebsd OK
powerpc-eabisim OK
powerpcle-elf OK
powerpc-eabivle OK
powerpc64-freebsd OK
powerpc-linux-gnu OK
powerpc64-linux-gnu OK
powerpc64le-linux-gnu OK
x86_64-rdos ********make
v850-elf ********make
x86_64-cloudabi ********make
sparc-elf ********make
xgate-elf ********make
visium-elf ********make
tilepro-linux-gnu ********make
xstormy16-elf ********make
spu-elf ********make
s390x-linux-gnu ********make
sparc-vxworks ********make
vax-netbsdelf ********make
sparc-linux-gnu ********make
score-elf ********make
sparc64-linux-gnu ********make
tic6x-elf ********make
sparc-sun-solaris2 ********make
tilegx-linux-gnu ********make
wasm32 OK
sh-pe check
tic30-unknown-coff OK
tic4x-coff OK
sh-coff check
sh-vxworks check
tic54x-coff OK
sh-rtems check
sh-nto check
shle-unknown-netbsdelf check
x86_64-w64-mingw32 check
sh4-linux-gnu check
x86_64-pc-linux-gnux32 OK
x86_64-linux-gnu OK
z80-elf ********make
xtensa-lx106-elf ********make
z80-coff OK
z8k-coff OK
The errors are all like this:
/usr/local/bin/ld: pdb.o: in function `handle_debugs_section':
/home/alan/src/binutils-gdb/ld/pdb.c:1863: undefined reference to `_bfd_coff_read_internal_relocs'
collect2: error: ld returned 1 exit status
There are also (false positive I think) compiler warnings that should
be fixed.
In function ‘handle_debugs_section’,
inlined from ‘populate_module_stream’ at /home/alan/src/binutils-gdb/ld/pdb.c:3638:13,
inlined from ‘create_module_info_substream’ at /home/alan/src/binutils-gdb/ld/pdb.c:3792:12,
inlined from ‘populate_dbi_stream’ at /home/alan/src/binutils-gdb/ld/pdb.c:4305:8,
inlined from ‘create_pdb_file’ at /home/alan/src/binutils-gdb/ld/pdb.c:4997:8:
/home/alan/src/binutils-gdb/ld/pdb.c:2067:24: error: ‘bufptr’ may be used uninitialized [-Werror=maybe-uninitialized]
2067 | bufptr += sizeof (uint32_t);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/alan/src/binutils-gdb/ld/pdb.c: In function ‘create_pdb_file’:
/home/alan/src/binutils-gdb/ld/pdb.c:1838:18: note: ‘bufptr’ was declared here
1838 | uint8_t *buf, *bufptr, *symbuf, *symbufptr;
| ^~~~~~
In function ‘copy_filechksms’,
inlined from ‘handle_debugs_section’ at /home/alan/src/binutils-gdb/ld/pdb.c:2042:9,
inlined from ‘populate_module_stream’ at /home/alan/src/binutils-gdb/ld/pdb.c:3638:13,
inlined from ‘create_module_info_substream’ at /home/alan/src/binutils-gdb/ld/pdb.c:3792:12,
inlined from ‘populate_dbi_stream’ at /home/alan/src/binutils-gdb/ld/pdb.c:4305:8,
inlined from ‘create_pdb_file’ at /home/alan/src/binutils-gdb/ld/pdb.c:4997:8:
/home/alan/src/binutils-gdb/ld/pdb.c:717:13: error: ‘strptr’ may be used uninitialized [-Werror=maybe-uninitialized]
717 | strptr++;
| ~~~~~~^~
/home/alan/src/binutils-gdb/ld/pdb.c: In function ‘create_pdb_file’:
/home/alan/src/binutils-gdb/ld/pdb.c:613:19: note: ‘strptr’ was declared here
613 | struct string **strptr;
| ^~~~~~
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list