Date: Fri, 29 Dec 2017 16:18:54 -0800 From: Mark Millard <markmi@dsl-only.net> To: Ed Maste <emaste@freebsd.org>, Dimitry Andric <dim@freebsd.org>, Justin Hibbits <chmeeedalf@gmail.com>, Nathan Whitehorn <nwhitehorn@freebsd.org> Cc: FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Is the clang 5.0.1 use of .rela.plt and R_PPC64_JMP_SLOT for kernel modules a llvm issue? Just a FreeBSD one? Message-ID: <2BD5FD21-95E7-4661-B8B9-2FDCDB986149@dsl-only.net> In-Reply-To: <A6240F3A-19F0-4BE9-A53D-7BA7BA703B9B@dsl-only.net> References: <39C042C5-9800-464C-84AC-677DB45DA1C1@dsl-only.net> <A9FD92FD-7877-4457-9A2B-A21FF0A4F0DD@dsl-only.net> <244D5C85-E1E7-4349-A46A-1D275D54833F@dsl-only.net> <55A9388E-2C04-4388-A4E9-F25574FAF129@dsl-only.net> <68EA105F-3ADF-4CBB-BD59-7A9F18E52DB3@dsl-only.net> <313C2310-ABEF-4BEE-A853-A9965680C3AC@dsl-only.net> <A6240F3A-19F0-4BE9-A53D-7BA7BA703B9B@dsl-only.net>
next in thread | previous in thread | raw e-mail | index | archive | help
I've not been able to figure out if I should submit something into llvm's bugzilla for the powerpc64 switching to .rela.plt and R_PPC64_JMP_SLOT for kernel modules from the earlier .rela.dyn and R/PPC64_RELATIVE and R_PPC64_ADDR64 for kernel modules. (I do not know if powerpc would also have the issue since other things have been stopping that build for a long time.) Do one or more of you have a clue? Reminder: I have submitted FreeBSD bugzilla 224561 for the issue. The difference in the likes of filemon.ko produced by system clang 5.0.1 vs. devel/powerpc64-xtoolchain-gcc is. . . clang 5.0.1: Relocation section with addend (.rela.plt): r_offset r_info r_type st_value st_name + = r_addend 000000014480 000300000015 R_PPC64_JMP_SLOT 0000000000000000 copyinstr = + 0 000000014488 000400000015 R_PPC64_JMP_SLOT 0000000000000000 = devfs_set_cdevpriv + 0 . . . vs. devel/powerpc64-xtoolchain-gcc: Relocation section with addend (.rela.dyn): r_offset r_info r_type st_value st_name + = r_addend 0000000145c0 000000000016 R_PPC64_RELATIVE 0000000000000000 + 40d0 0000000145e0 000000000016 R_PPC64_RELATIVE 0000000000000000 + 145b0 . . . 000000014408 000600000026 R_PPC64_ADDR64 0000000000000000 sysent + = 0 000000014410 001100000026 R_PPC64_ADDR64 0000000000000000 = freebsd32_sysent + 0 Apparently R_PPC64_JMP_SLOT is mishandled and does not explicitly lead to rejection of the attempted dynamic load. It might be an issue if .rela.plt and R_PPC64_JMP_SLOT should even be generated instead of .rela.dyn and R_PPC64_RELATIVE and R_PPC64_ADDR64. =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?2BD5FD21-95E7-4661-B8B9-2FDCDB986149>