From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 30 07:56:06 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 67EA5A74 for ; Tue, 30 Jul 2013 07:56:06 +0000 (UTC) (envelope-from shrikanth07@gmail.com) Received: from mail-vb0-x22d.google.com (mail-vb0-x22d.google.com [IPv6:2607:f8b0:400c:c02::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C4E72AA5 for ; Tue, 30 Jul 2013 07:56:06 +0000 (UTC) Received: by mail-vb0-f45.google.com with SMTP id p14so3539401vbm.32 for ; Tue, 30 Jul 2013 00:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=IgW2y3ZuK7H2Gr26taRMXZoSyR3ItGldSdV20X0YWa0=; b=i2LGaNmwC9TuVrM9j4s5VdvWIH9SxBD9pK6lPFuSKEXKbiSnUZkoLxY7UONZeDidyi IIBNwWtS2ltPv1yzZBKwdrQpiVR52GRPfOc61FjWg1aI6Mpu2jzQH6vWn+D2rYNW6aq5 iEN+EwdL5N/tjke1CrhSMmv7PAD7OF5cWYeXIcburC/ThI8S2XEn6e5aSHAtCI1KWV9D mQQcrQv0+MIGUCrolN7LINchYIrfxdiAVj6abPmBnuL4fVDdt1bB/Dg8rh/1p6wZ1W2C jaSK8UV5EUKShKZqF5H+E1hxswTVJCt4DTsEg6wXC4PNJWwYHBQcOodqtaorvPNIb+qF gZyw== MIME-Version: 1.0 X-Received: by 10.220.173.195 with SMTP id q3mr9455404vcz.86.1375170964719; Tue, 30 Jul 2013 00:56:04 -0700 (PDT) Received: by 10.58.232.41 with HTTP; Tue, 30 Jul 2013 00:56:04 -0700 (PDT) Date: Tue, 30 Jul 2013 00:56:04 -0700 Message-ID: Subject: Symbols in symtab reordered between module.kld and module.ko? From: Shrikanth Kamath To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 07:56:06 -0000 I am comparing the readelf -s snapshot from module.kld and module.ko for a module build in a cross compiler FreeBSD 10 environment, Do the symbols in symtab get reordered between module.kld and module.ko, as an example readelf -s module.kld we pick 2 symbols 2651: 000b8230 74 FUNC GLOBAL DEFAULT 1 prison_equal_ip6 2652: 00030140 3318 FUNC GLOBAL DEFAULT 1 ip_output Compare them with readelf -s from module.ko 2558: 0007a6d0 3318 FUNC GLOBAL DEFAULT 5 ip_output 2559: 001027c0 74 FUNC GLOBAL DEFAULT 5 prison_equal_ip6 So the symbol ip_output appears after prison_equal_ip6 in module.kld but appears before it in module.ko. The problem is this is affecting the DTrace FBT probing, running FBT probe of ip_output shows as having arguments of prison_equal_ip6. The way module.ko is being derived from module.kld is ld -m elf_i386 -Bshareable --verbose -o module.ko.debug module.kld How can I suppress this re-ordering?