From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 357E73858D1E for ; Thu, 22 Dec 2022 00:05:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 357E73858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62e.google.com with SMTP id jn22so424132plb.13 for ; Wed, 21 Dec 2022 16:05:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=GVtVDY2gIsLihiQL0UjDspS4xVNWf5H/UktaRfq7c9M=; b=BfmNnPIG6T5GbKfN/U1gO413oT47CxNXZ+Po9h0L9jP0dluTaD6v9Fq1LwhVhV6RAi YrkNGrSyY6GnNxWcUylY8dOk7VQjRDwv2W7ZdjKo8p2sNl0aiHyXx7+W63UEn4Anj6ao vVU8lYHVAhzt+bzxOgNb5z2Gfn8F3VXu0mRA7Lvvm9vuR/hUhpNMqpqrNyDZ+NPnVtTI mzqb/+RMBVtYZctUQXw0/nBxaQ5oZrC4w88SDO5XAVLUZjhYt4jQabGX0IeGwKh4HOBR ok50K9jTbQh7gKvxD5WUAX2DSHjUkijCYDSfWg1xfZ/NVamKBjsEu702puMleD4XtNLJ +RXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GVtVDY2gIsLihiQL0UjDspS4xVNWf5H/UktaRfq7c9M=; b=v5dG8xVluSYMqs3WK4s88zMd5odBbKarE5G9BrjXStasq45oD2vLg53uqo0TSYCz31 aoyoXZZspmRRyAjINwXQ5JLZ8gb4yzkIoor/uTVyKWV+0hensJ1ZSaATOeSiwH6m/m0G BNc5Q/LJdyj1I0zOJqYtKB9bN4mQiExJ4dJphIqIfcg7zhU8OxrM4H+xS0ysfgJ17Km5 GRfXeYSv69Wh2C8mCJxZJZL3/2XZqYi5g1Ma0laxqwtvkY2IDbAe/Gd6lNjBXlvJ4nxX Ch3Lx28IA59GVYC7Uq/xiySw7l0vRmBEn1XIUFThJe0CLGUCxKtCi4KfgYgIeLFD/tUN M1zw== X-Gm-Message-State: AFqh2kqYMVzIFIQZU1meZhHsYgAb5zyPIhVoL8s3aQOjtkonvj0DAtoP wTarsDSyatvJdr2JS9WghtQ/JIDiauM= X-Google-Smtp-Source: AMrXdXucP/0h+IAXkSLUrAydBcTReaOh2L1bT1cX7E4fJgJ+S2NaAHqn5PqAESNwyz1FEq7M2GqcTA== X-Received: by 2002:a17:902:edc3:b0:191:4389:f8f5 with SMTP id q3-20020a170902edc300b001914389f8f5mr3282005plk.34.1671667551083; Wed, 21 Dec 2022 16:05:51 -0800 (PST) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id f2-20020a170902ce8200b00188c04258c9sm12099425plg.52.2022.12.21.16.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 16:05:50 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 183F91142CFC; Thu, 22 Dec 2022 10:35:48 +1030 (ACDT) Date: Thu, 22 Dec 2022 10:35:48 +1030 From: Alan Modra To: Mark Harmstone Cc: binutils@sourceware.org, nickc@redhat.com Subject: Re: [PATCH 01/10] ld: Generate PDB string table Message-ID: References: <20221209015240.6348-1-mark@harmstone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221209015240.6348-1-mark@harmstone.com> X-Spam-Status: No, score=-3029.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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