From nobody Wed Jul 19 19:20:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R5lz72Twxz4njGp; Wed, 19 Jul 2023 19:20:51 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4R5lz636Gzz42sN; Wed, 19 Jul 2023 19:20:50 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.2/8.16.1) with ESMTP id 36JJKf7w003638; Wed, 19 Jul 2023 22:20:41 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.2/8.16.1/Submit) id 36JJKfUD003637; Wed, 19 Jul 2023 22:20:41 +0300 (MSK) (envelope-from dchagin) Date: Wed, 19 Jul 2023 22:20:41 +0300 From: Dmitry Chagin To: =?utf-8?Q?T=C4=B3l?= Coosemans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c84617e87a70 - main - i386: Switch to PIC kernel modules Message-ID: References: <202307191821.36JILaDo009337@gitrepo.freebsd.org> <20230719210246.30bf78b8@hal.tijl.coosemans.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230719210246.30bf78b8@hal.tijl.coosemans.org> X-Rspamd-Queue-Id: 4R5lz636Gzz42sN X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Wed, Jul 19, 2023 at 09:02:46PM +0200, Tijl Coosemans wrote: > On Wed, 19 Jul 2023 18:21:36 GMT Dmitry Chagin wrote: > > The branch main has been updated by dchagin: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=c84617e87a70f4aea5df46fa521835aefa7d8163 > > > > commit c84617e87a70f4aea5df46fa521835aefa7d8163 > > Author: Dmitry Chagin > > AuthorDate: 2023-07-19 18:21:04 +0000 > > Commit: Dmitry Chagin > > CommitDate: 2023-07-19 18:21:04 +0000 > > > > i386: Switch to PIC kernel modules > > > > It seems since the last llvm project update, the lld linker has started > > creating a PLT dependent kernel module object files. > > > > Reviewed by: kib, jhb, emaste > > Differential Revision: https://reviews.freebsd.org/D41088 > > --- > > sys/conf/kmod.mk | 2 +- > > sys/i386/i386/elf_machdep.c | 1 + > > 2 files changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk > > index 246af5ba1e81..a83d64eb8bf7 100644 > > --- a/sys/conf/kmod.mk > > +++ b/sys/conf/kmod.mk > > @@ -166,7 +166,7 @@ CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer > > .endif > > > > .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" || \ > > - ${MACHINE_CPUARCH} == "powerpc" > > + ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "i386" > > CFLAGS+= -fPIC > > .endif > > > > diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c > > index d8b7ab9c586b..5d8b41a16672 100644 > > --- a/sys/i386/i386/elf_machdep.c > > +++ b/sys/i386/i386/elf_machdep.c > > @@ -244,6 +244,7 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, > > break; > > > > case R_386_GLOB_DAT: /* S */ > > + case R_386_JMP_SLOT: /* S */ > > error = lookup(lf, symidx, 1, &addr); > > if (error != 0) > > return (-1); > > Is it this bug: https://bugs.llvm.org/show_bug.cgi?id=51736 ? I think this is it