[Bug 207898] kernel linker behaves differently on amd64 vs. i386
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Mar 11 09:27:29 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207898
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 at FreeBSD.org
Reporter: truckman at FreeBSD.org
Created attachment 168000
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=168000&action=edit
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 source
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 static
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. FreeBSD
9.x has not been tested.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list