Date: Fri, 11 Mar 2016 09:27:29 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 207898] kernel linker behaves differently on amd64 vs. i386 Message-ID: <bug-207898-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207898 Bug ID: 207898 Summary: kernel linker behaves differently on amd64 vs. i386 Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: truckman@FreeBSD.org Created attachment 168000 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D168000&action= =3Dedit example kernel module source that illustrates the differing kernel linker behavior on amd64 vs i386 If one source file in a kernel module defines a symbol as static and another declares it as extern, the module fails to load on i386, with the kernel logging a message about the symbol being undefined. I believe this is the correct behavior. On amd64, the module loads and the code in the second so= urce file is able to access the static variable in the first source file. In the attached example, the main module source file is able to access stat= ic character arrays in the other source file when loaded on an amd64 machine. The behavior is the same on FreeBSD 10.1 through recent 11.0-CURRENT. Free= BSD 9.x has not been tested. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-207898-8>