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>, 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
>>=20 >> The original message said why=85 >=20 > 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. >=20 > I=92m frankly surprised that these relocations are being generated = unaligned. Perhaps that=92s > the real bug here that should be fixed. While I=92m OK with the = original patch (subject to the > above), I=92d 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=92m 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/ar= ch/arm/mdreloc.c = http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5/src/libexec/ld.elf_so/ar= ch/mips/mips_reloc.c >=20 > If this is a huge deal, then defining functions to do this is trivial. = I=92m just not sure it is common > enough to need a special macro/function call in the base. >=20 > Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AE875C4-0259-4741-9433-BA0A9C1DCC40>