Date: Tue, 22 Jul 2014 09:37:56 +0200 From: Fabien Thomas <fabient@freebsd.org> To: Warner Losh <imp@bsdimp.com> Cc: Tim Kientzle <tim@kientzle.com>, John-Mark Gurney <jmg@funkthat.com>, freebsd-arm <freebsd-arm@freebsd.org>, Ian Lepore <ian@freebsd.org>, arch@freebsd.org Subject: Re: [CFR] mge driver / elf reloc Message-ID: <3AE875C4-0259-4741-9433-BA0A9C1DCC40@freebsd.org> In-Reply-To: <B23A4513-FB0E-4972-91BA-976DCDF346E5@bsdimp.com> References: <14D22EA6-B73C-47BA-9A86-A957D24F23B8@freebsd.org> <1405810447.85788.41.camel@revolution.hippie.lan> <20140720220514.GP45513@funkthat.com> <F6D53A17-FED0-4F08-BB5B-9F66C5AF5EF6@kientzle.com> <20140720231056.GQ45513@funkthat.com> <9464C309-B390-4A27-981A-E854921B1C98@bsdimp.com> <20140721162559.GS45513@funkthat.com> <467619B1-F530-49AF-91BF-14CA3A31908B@bsdimp.com> <20140721165619.GT45513@funkthat.com> <B23A4513-FB0E-4972-91BA-976DCDF346E5@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>> >> The original message said why… > > I personally think the original code should unconditionally call load_ptr() and store_ptr() > and if the optimization for aligned access is actually worth doing, the test for it should be > in those functions rather than inline throughout the code. The code will be clearer, and > it would be easier to optimize those cases that actually matter. > > I’m frankly surprised that these relocations are being generated unaligned. Perhaps that’s > the real bug here that should be fixed. While I’m OK with the original patch (subject to the > above), I’d be curious what other cases there are for this functionality. You had said that > you had additional use cases in the network stack, but I’m having trouble groking the > use cases. The problem was two years ago but if I remember correctly the module used a packed structure with function pointer inside (at least). The fix came from NetBSD: http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5/src/libexec/ld.elf_so/arch/arm/mdreloc.c http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5/src/libexec/ld.elf_so/arch/mips/mips_reloc.c > > If this is a huge deal, then defining functions to do this is trivial. I’m just not sure it is common > enough to need a special macro/function call in the base. > > Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AE875C4-0259-4741-9433-BA0A9C1DCC40>
