public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: Mark Harmstone <mark@harmstone.com>
Cc: binutils@sourceware.org, nickc@redhat.com
Subject: Re: [PATCH 01/10] ld: Generate PDB string table
Date: Thu, 22 Dec 2022 10:35:48 +1030	[thread overview]
Message-ID: <Y6OfXNnEQlhTg45k@squeak.grove.modra.org> (raw)
In-Reply-To: <20221209015240.6348-1-mark@harmstone.com>

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

  parent reply	other threads:[~2022-12-22  0:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09  1:52 Mark Harmstone
2022-12-09  1:52 ` [PATCH 02/10] ld: Write DEBUG_S_FILECHKSMS entries in PDBs Mark Harmstone
2022-12-09  1:52 ` [PATCH 03/10] ld: Fix segfault in populate_publics_stream Mark Harmstone
2022-12-09  1:52 ` [PATCH 04/10] ld: Write DEBUG_S_LINES entries in PDB file Mark Harmstone
2022-12-09  1:52 ` [PATCH 05/10] ld: Write types into TPI stream of PDB Mark Harmstone
2022-12-09  1:52 ` [PATCH 06/10] ld: Write types into IPI " Mark Harmstone
2022-12-09  1:52 ` [PATCH 07/10] ld: Parse LF_UDT_SRC_LINE records when creating PDB file Mark Harmstone
2022-12-09  1:52 ` [PATCH 08/10] ld: Write globals stream in PDB Mark Harmstone
2022-12-09  1:52 ` [PATCH 09/10] ld: Copy other symbols into PDB file Mark Harmstone
2022-12-09  1:52 ` [PATCH 10/10] ld: Write linker symbols in PDB Mark Harmstone
2022-12-22  0:05 ` Alan Modra [this message]
2022-12-22  1:25   ` [PATCH 01/10] ld: Generate PDB string table Alan Modra
2022-12-22 10:22     ` Alan Modra
2022-12-23 10:54       ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y6OfXNnEQlhTg45k@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=mark@harmstone.com \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).