Date: Sun, 30 Jul 2017 15:03:51 -0700 From: Mark Millard <markmi@dsl-only.net> To: Dimitry Andric <dim@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: I have submitted bugzilla 221107 for a (e.g.) -r321706 system clang 5 vintage TARGET_ARCH=powerpc buildkernel failure for aha.kld: R_PPC_PLTREL24 reloc against local symbol Message-ID: <636276E6-BA4C-4C28-84FF-A34BDF1F1702@dsl-only.net> In-Reply-To: <186BF66E-04E5-4663-AD0B-E07A9C631925@dsl-only.net> References: <186BF66E-04E5-4663-AD0B-E07A9C631925@dsl-only.net>
next in thread | previous in thread | raw e-mail | index | archive | help
[Just correcting the -r's to be -r321706.] On 2017-Jul-30, at 1:34 PM, Mark Millard <markmi@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/m= odules/usr/src/sys/modules/aha/aha.kld . . . --- all_subdir_aha --- Building = /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/m= odules/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=3D'aha.ko.full' = .ERROR_META_FILE=3D'/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys= /GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha/aha.ko.full.meta' .MAKE.LEVEL=3D'4' MAKEFILE=3D'' .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes = verbose' _ERROR_CMD=3D'ld -m elf32ppc_fbsd -Bshareable -znotext -d -warn-common = -o aha.ko.full aha.kld;' .CURDIR=3D'/usr/src/sys/modules/aha' .MAKE=3D'make' = .OBJDIR=3D'/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICv= tsc-NODBG/modules/usr/src/sys/modules/aha' .TARGETS=3D'all' DESTDIR=3D'' LD_LIBRARY_PATH=3D'' MACHINE=3D'powerpc' MACHINE_ARCH=3D'powerpc' = MAKEOBJDIRPREFIX=3D'/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys= /GENERICvtsc-NODBG/modules' MAKESYSPATH=3D'/usr/src/share/mk' MAKE_VERSION=3D'20170720' --- all_subdir_agp --- Building = /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/m= odules/usr/src/sys/modules/agp/agp.ko.full --- all_subdir_aha --- = PATH=3D'/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/ob= j/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/sbin:/usr/obj/powerpcv= tsc_clang/powerpc.powerpc/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bi= n' SRCTOP=3D'/usr/src' = OBJTOP=3D'/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvt= sc-NODBG/modules/usr/src' .MAKE.MAKEFILES=3D'/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=3D'. /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=3D'aha.ko.full' = .ERROR_META_FILE=3D'/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys= /GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha/aha.ko.full.meta' .MAKE.LEVEL=3D'4' MAKEFILE=3D'' .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes = verbose' _ERROR_CMD=3D'ld -m elf32ppc_fbsd -Bshareable -znotext -d -warn-common = -o aha.ko.full aha.kld;' .CURDIR=3D'/usr/src/sys/modules/aha' .MAKE=3D'make' = .OBJDIR=3D'/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICv= tsc-NODBG/modules/usr/src/sys/modules/aha' .TARGETS=3D'all' DESTDIR=3D'' LD_LIBRARY_PATH=3D'' MACHINE=3D'powerpc' MACHINE_ARCH=3D'powerpc' = MAKEOBJDIRPREFIX=3D'/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys= /GENERICvtsc-NODBG/modules' MAKESYSPATH=3D'/usr/src/share/mk' MAKE_VERSION=3D'20170720' = PATH=3D'/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/ob= j/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/sbin:/usr/obj/powerpcv= tsc_clang/powerpc.powerpc/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bi= n' SRCTOP=3D'/usr/src' = OBJTOP=3D'/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvt= sc-NODBG/modules/usr/src' .MAKE.MAKEFILES=3D'/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=3D'. /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-am= d64-host.sh -j8 buildworld buildkernel # more = ~/sys_build_scripts.amd64-host/make_powerpcvtsc_nodebug_clang_bootstrap-am= d64-host.sh=20 kldload -n filemon && \ script = ~/sys_typescripts/typescript_make_powerpcvtsc_nodebug_clang_bootstrap-amd6= 4-host-$(date +%Y-%m-%d:%H:%M:%S) \ env __MAKE_CONF=3D"/root/src.configs/make.conf" SRCCONF=3D"/dev/null" = SRC_ENV_CONF=3D"/root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-h= ost" \ WITH_META_MODE=3Dyes \ MAKEOBJDIRPREFIX=3D"/usr/obj/powerpcvtsc_clang" \ make $* C# more /root/src.configs/make.conf CFLAGS.gcc+=3D -v # more /root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-host TO_TYPE=3Dpowerpc # KERNCONF=3DGENERICvtsc-NODBG TARGET=3D${TO_TYPE} .if ${.MAKE.LEVEL} =3D=3D 0 TARGET_ARCH=3D${TO_TYPE} .export TARGET_ARCH .endif # WITH_CROSS_COMPILER=3D WITHOUT_SYSTEM_COMPILER=3D # WITH_LIBCPLUSPLUS=3D WITH_BINUTILS_BOOTSTRAP=3D WITH_ELFTOOLCHAIN_BOOTSTRAP=3D WITH_CLANG_BOOTSTRAP=3D WITH_CLANG=3D WITH_CLANG_IS_CC=3D WITH_CLANG_FULL=3D WITH_CLANG_EXTRAS=3D WITHOUT_LLD=3D # lldb requires missing atomic 8-byte operations for powerpc (non-64) WITHOUT_LLDB=3D # WITH_BOOT=3D WITHOUT_LIB32=3D # WITHOUT_GCC_BOOTSTRAP=3D WITHOUT_GCC=3D WITHOUT_GCC_IS_CC=3D WITHOUT_GNUCXX=3D # NO_WERROR=3D # # 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=3D MALLOC_PRODUCTION=3D # WITH_REPRODUCIBLE_BUILD=3D WITH_DEBUG_FILES=3D =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?636276E6-BA4C-4C28-84FF-A34BDF1F1702>