From owner-freebsd-bugs@freebsd.org Sat Mar 12 07:56:37 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44BF8ACD780 for ; Sat, 12 Mar 2016 07:56:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 362F9DD8 for ; Sat, 12 Mar 2016 07:56:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u2C7uaIN074574 for ; Sat, 12 Mar 2016 07:56:37 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 207898] kernel linker behaves differently on amd64 vs. i386 Date: Sat, 12 Mar 2016 07:56:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: truckman@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 07:56:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207898 --- Comment #1 from Don Lewis --- Most of the kernel linker code is MI, but there is some MD code in /usr/src/sys/{amd64/amd64,i386/i386}/elf_machdep.c. I didn't see anything suspicious there. The MI code is difficult to figure out, but that is where I suspect the pro= blem is. I suspect that whether or not the problem is triggered depends on the order of the relocation entries in the .ko file. On amd64, I see this when= I run nm on the .ko file: [snip] U module_register_init 0000000000000000 b msg1 U msg1 0000000000000050 b msg2 U msg2 U strcpy U uprintf On i386, I see this: [snip] U module_register_init U msg1 000014c4 b msg1 U msg2 00001514 b msg2 U strcpy U uprintf Note that the "b" entries for msg1 and msg2 precede the "U" entries on amd6= 4, but the reverse is true on i386. Unfortunately this is difficult to test because swapping the order of SRCS = does not change the order as reported by nm. --=20 You are receiving this mail because: You are the assignee for the bug.=