[A top post about the failing R_PPC_PLTREL24 since the material does not flow well as a sequential read from prior material. I found that the .kld does not match the contributing .o for GLOBAL status for routines and the LOCAL in the .kld is rejected by ld in ppc_elf_check_relocs.] There is something consistent between the two example failures. (The examples here are from a more recent head version for a buildkernel attempt.) (I inserted some lines not matched by the shown grep.) # readelf -a /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha/aha.kld | grep aha_alloc 00002b8c 00003e12 R_PPC_PLTREL24 00000000 aha_alloc + 0 000031a8 00003e12 R_PPC_PLTREL24 00000000 aha_alloc + 0 Symbol table (.symtab) contains 180 entries: Num: Value Size Type Bind Vis Ndx Name 62: 0000000000000000 96 FUNC LOCAL DEFAULT 1 aha_alloc but in aha.o : 44: 0000000000000000 96 FUNC GLOBAL DEFAULT 2 aha_alloc # readelf -a /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/agp/agp.kld | grep agp_find_caps 00002e08 00004912 R_PPC_PLTREL24 00000000 agp_find_caps + 0 Symbol table (.symtab) contains 180 entries: Num: Value Size Type Bind Vis Ndx Name 73: 0000000000000000 172 FUNC LOCAL DEFAULT 1 agp_find_caps but in agp.o : 58: 0000000000000000 172 FUNC GLOBAL DEFAULT 2 agp_find_caps building the .kld's is turning GLOBAL into LOCAL -- and the LOCAL is being rejected by: /usr/src/contrib/binutils/bfd/elf32-ppc.c in its routine: /* Look through the relocs for a section during the first phase, and allocate space in the global offset table or procedure linkage table. */ static bfd_boolean ppc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) via: r_symndx = ELF32_R_SYM (rel->r_info); if (r_symndx < symtab_hdr->sh_info) h = NULL; else . . . tls_type = 0; r_type = ELF32_R_TYPE (rel->r_info); . . . switch (r_type) { . . . case R_PPC_PLT32: case R_PPC_PLTREL24: case R_PPC_PLTREL32: case R_PPC_PLT16_LO: case R_PPC_PLT16_HI: case R_PPC_PLT16_HA: #ifdef DEBUG fprintf (stderr, "Reloc requires a PLT entry\n"); #endif /* This symbol requires a procedure linkage table entry. We actually build the entry in finish_dynamic_symbol, because this might be a case of linking PIC code without linking in any dynamic objects, in which case we don't need to generate a procedure linkage table after all. */ if (h == NULL) { /* It does not make sense to have a procedure linkage table entry for a local symbol. */ (*_bfd_error_handler) (_("%B(%A+0x%lx): %s reloc against " "local symbol"), abfd, sec, (long) rel->r_offset, ppc_elf_howto_table[r_type]->name); bfd_set_error (bfd_error_bad_value); return FALSE; } else . . . === Mark Millard markmi at dsl-only.net On 2017-Aug-6, at 2:44 PM, Mark Millard <markmi_at_dsl-only.net> wrote: [-r322109 update failed for agp.kld instead. It may just be a race for which happens first during the build.] On 2017-Jul-30, at 3:03 PM, Mark Millard <markmi_at_dsl-only.net> wrote: > [Just correcting the -r's to be -r321706.] > > On 2017-Jul-30, at 1:34 PM, Mark Millard <markmi_at_dsl-only.net> wrote: > > I experiment with system clang targeting powerpc > (and powerpc64). Until recently I could buildkernel > via system clang 4 (but it had problems if tried to > boot such a kernel). After clang 5 it no longer > completes the buildkernel. I'm submitting based on > a -r321706 build attempt. The system binutils are > in use. > > The technical material from the submittal is. . . > > First I list what the R_PPC_PLTREL24 is tied to > then the error text then the build context. > > objdump reports that the .text+0x2b94 involved > is in aha_isa_probe and is a reference to aha_alloc: > > (sorted objdump -x output:) > 00002b78 R_PPC_PLTREL24 bus_alloc_resource > 00002b88 R_PPC_PLTREL24 rman_get_start > 00002b94 R_PPC_PLTREL24 aha_alloc > 00002b96 R_PPC_ADDR32 .debug_str+0x0000266c > 00002b9c R_PPC_PLTREL24 aha_probe > 00002b9f R_PPC_ADDR32 .debug_str+0x00001904 > > (objdump -d --prefix-addresses output:) > 00002aa4 <aha_isa_probe> mflr r0 > . . . > 00002b7c <aha_isa_probe+0xd8> cmplwi r3,0 > 00002b80 <aha_isa_probe+0xdc> stw r3,188(r28) > 00002b84 <aha_isa_probe+0xe0> beq 00002c1c <aha_isa_probe+0x178> > 00002b88 <aha_isa_probe+0xe4> bl 00002b88 <aha_isa_probe+0xe4> > 00002b8c <aha_isa_probe+0xe8> mr r3,r28 > 00002b90 <aha_isa_probe+0xec> mr r27,r4 > 00002b94 <aha_isa_probe+0xf0> bl 00002b94 <aha_isa_probe+0xf0> > 00002b98 <aha_isa_probe+0xf4> mr r3,r28 > 00002b9c <aha_isa_probe+0xf8> bl 00002b9c <aha_isa_probe+0xf8> > 00002ba0 <aha_isa_probe+0xfc> cmplwi r3,0 > > > --- all_subdir_aha --- > Building /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha/aha.kld > . . . > --- all_subdir_aha --- > Building /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha/aha.ko.full > . . . > --- aha.ko.full --- > ld: aha.kld(.text+0x2b94): R_PPC_PLTREL24 reloc against local symbol > aha.kld: could not read symbols: Bad value > . . . > --- all_subdir_aha --- > *** [aha.ko.full] Error code 1 > > make[4]: stopped in /usr/src/sys/modules/aha > .ERROR_TARGET='aha.ko.full' > .ERROR_META_FILE='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha/aha.ko.full.meta' > .MAKE.LEVEL='4' > MAKEFILE='' > .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose' > _ERROR_CMD='ld -m elf32ppc_fbsd -Bshareable -znotext -d -warn-common -o aha.ko.full aha.kld;' > .CURDIR='/usr/src/sys/modules/aha' > .MAKE='make' > .OBJDIR='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha' > .TARGETS='all' > DESTDIR='' > LD_LIBRARY_PATH='' > MACHINE='powerpc' > MACHINE_ARCH='powerpc' > MAKEOBJDIRPREFIX='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules' > MAKESYSPATH='/usr/src/share/mk' > MAKE_VERSION='20170720' > --- all_subdir_agp --- > Building /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/agp/agp.ko.full > --- all_subdir_aha --- > PATH='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin' > SRCTOP='/usr/src' > OBJTOP='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src' > .MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk /root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-host /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk /usr/src/share/mk/src.sys.mk /dev/null /usr/src/sys/modules/aha/Makefile /usr/src/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.mk /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk /usr/src/sys/modules/aha/../Makefile.inc /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk /usr/src/sys/conf/kern.opts.mk /usr/src/sys/conf/config.mk /usr/src/share/mk/bsd.links.mk /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk /usr/src/sys/conf/kern.mk' > .PATH='. /usr/src/sys/modules/aha /usr/src/sys/dev/aha /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG' > 1 error > > make[4]: stopped in /usr/src/sys/modules/aha > .ERROR_TARGET='aha.ko.full' > .ERROR_META_FILE='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha/aha.ko.full.meta' > .MAKE.LEVEL='4' > MAKEFILE='' > .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose' > _ERROR_CMD='ld -m elf32ppc_fbsd -Bshareable -znotext -d -warn-common -o aha.ko.full aha.kld;' > .CURDIR='/usr/src/sys/modules/aha' > .MAKE='make' > .OBJDIR='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha' > .TARGETS='all' > DESTDIR='' > LD_LIBRARY_PATH='' > MACHINE='powerpc' > MACHINE_ARCH='powerpc' > MAKEOBJDIRPREFIX='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules' > MAKESYSPATH='/usr/src/share/mk' > MAKE_VERSION='20170720' > PATH='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin' > SRCTOP='/usr/src' > OBJTOP='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src' > .MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk /root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-host /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk /usr/src/share/mk/src.sys.mk /dev/null /usr/src/sys/modules/aha/Makefile /usr/src/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.mk /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk /usr/src/sys/modules/aha/../Makefile.inc /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk /usr/src/sys/conf/kern.opts.mk /usr/src/sys/conf/config.mk /usr/src/share/mk/bsd.links.mk /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk /usr/src/sys/conf/kern.mk' > .PATH='. /usr/src/sys/modules/aha /usr/src/sys/dev/aha /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG' > *** [all_subdir_aha] Error code 2 > > > Build context: > > ~/sys_build_scripts.amd64-host/make_powerpcvtsc_nodebug_clang_bootstrap-amd64-host.sh -j8 buildworld buildkernel > > # more ~/sys_build_scripts.amd64-host/make_powerpcvtsc_nodebug_clang_bootstrap-amd64-host.sh > kldload -n filemon && \ > script ~/sys_typescripts/typescript_make_powerpcvtsc_nodebug_clang_bootstrap-amd64-host-$(date +%Y-%m-%d:%H:%M:%S) \ > env __MAKE_CONF="/root/src.configs/make.conf" SRCCONF="/dev/null" SRC_ENV_CONF="/root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-host" \ > WITH_META_MODE=yes \ > MAKEOBJDIRPREFIX="/usr/obj/powerpcvtsc_clang" \ > make $* > > C# more /root/src.configs/make.conf > CFLAGS.gcc+= -v > > # more /root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-host > TO_TYPE=powerpc > # > KERNCONF=GENERICvtsc-NODBG > TARGET=${TO_TYPE} > .if ${.MAKE.LEVEL} == 0 > TARGET_ARCH=${TO_TYPE} > .export TARGET_ARCH > .endif > # > WITH_CROSS_COMPILER= > WITHOUT_SYSTEM_COMPILER= > # > WITH_LIBCPLUSPLUS= > WITH_BINUTILS_BOOTSTRAP= > WITH_ELFTOOLCHAIN_BOOTSTRAP= > WITH_CLANG_BOOTSTRAP= > WITH_CLANG= > WITH_CLANG_IS_CC= > WITH_CLANG_FULL= > WITH_CLANG_EXTRAS= > WITHOUT_LLD= > # lldb requires missing atomic 8-byte operations for powerpc (non-64) > WITHOUT_LLDB= > # > WITH_BOOT= > WITHOUT_LIB32= > # > WITHOUT_GCC_BOOTSTRAP= > WITHOUT_GCC= > WITHOUT_GCC_IS_CC= > WITHOUT_GNUCXX= > # > NO_WERROR= > # > # Use WERROR to avoid stopping at the likes of: > # error: implicit conversion from 'int' to 'int8_t' (aka 'signed char') changes value from 128 to -128 [-Werror,-Wconstant-conversion] > WERROR= > MALLOC_PRODUCTION= > # > WITH_REPRODUCIBLE_BUILD= > WITH_DEBUG_FILES= I have updated bugzilla 221107 for that building -r322109 as an update the failure changed to agp.kld but for the same kind of error notices: --- all_subdir_agp --- Building /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/agp/agp.ko.full . . . --- all_subdir_agp --- --- agp.ko.full --- ld: agp.kld(.text+0x2e08): R_PPC_PLTREL24 reloc against local symbol agp.kld: could not read symbols: Bad value *** [agp.ko.full] Error code 1 make[4]: stopped in /usr/src/sys/modules/agp .ERROR_TARGET='agp.ko.full' .ERROR_META_FILE='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/agp/agp.ko.full.meta' .MAKE.LEVEL='4' MAKEFILE='' .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose' _ERROR_CMD='ld -m elf32ppc_fbsd -Bshareable -znotext -d -warn-common -o agp.ko.full agp.kld;' .CURDIR='/usr/src/sys/modules/agp' .MAKE='make' .OBJDIR='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/agp' .TARGETS='all' DESTDIR='' LD_LIBRARY_PATH='' MACHINE='powerpc' MACHINE_ARCH='powerpc' MAKEOBJDIRPREFIX='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules' MAKESYSPATH='/usr/src/share/mk' MAKE_VERSION='20170720' PATH='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin' SRCTOP='/usr/src' OBJTOP='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src' .MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk /root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-host /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk /usr/src/share/mk/src.sys.mk /dev/null /usr/src/sys/modules/agp/Makefile /usr/src/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.mk /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk /usr/src/sys/modules/agp/../Makefile.inc /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk /usr/src/sys/conf/kern.opts.mk /usr/src/sys/conf/config.mk /usr/src/share/mk/bsd.links.mk /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk /usr/src/sys/conf/kern.mk' .PATH='. /usr/src/sys/modules/agp /usr/src/sys/dev/agp /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG' 1 error --- all_subdir_aha --- A failure has been detected in another branch of the parallel make make[4]: stopped in /usr/src/sys/modules/aha .ERROR_TARGET='' .ERROR_META_FILE='' .MAKE.LEVEL='4' MAKEFILE='' .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose' _ERROR_CMD='.PHONY' .CURDIR='/usr/src/sys/modules/aha' .MAKE='make' .OBJDIR='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha' .TARGETS='all' DESTDIR='' LD_LIBRARY_PATH='' MACHINE='powerpc' MACHINE_ARCH='powerpc' MAKEOBJDIRPREFIX='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules' MAKESYSPATH='/usr/src/share/mk' MAKE_VERSION='20170720' PATH='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin' SRCTOP='/usr/src' OBJTOP='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src' .MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk /root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-host /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk /usr/src/share/mk/src.sys.mk /dev/null /usr/src/sys/modules/aha/Makefile /usr/src/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.mk /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk /usr/src/sys/modules/aha/../Makefile.inc /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk /usr/src/sys/conf/kern.opts.mk /usr/src/sys/conf/config.mk /usr/src/share/mk/bsd.links.mk /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk /usr/src/sys/conf/kern.mk' .PATH='. /usr/src/sys/modules/aha /usr/src/sys/dev/aha /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG' *** [all_subdir_aha] Error code 2 === Mark Millard markmi at dsl-only.netReceived on Fri Aug 11 2017 - 00:22:46 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:12 UTC