From owner-freebsd-toolchain@FreeBSD.ORG Fri Jan 16 05:05:30 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 088135AB for ; Fri, 16 Jan 2015 05:05:30 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0087.outbound.protection.outlook.com [157.56.110.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3DF476A for ; Fri, 16 Jan 2015 05:05:28 +0000 (UTC) Received: from DM2PR0801MB652.namprd08.prod.outlook.com (10.242.127.155) by DM2PR0801MB649.namprd08.prod.outlook.com (10.242.127.152) with Microsoft SMTP Server (TLS) id 15.1.59.20; Fri, 16 Jan 2015 03:30:21 +0000 Received: from DM2PR0801MB652.namprd08.prod.outlook.com ([10.242.127.155]) by DM2PR0801MB652.namprd08.prod.outlook.com ([10.242.127.155]) with mapi id 15.01.0059.007; Fri, 16 Jan 2015 03:30:21 +0000 From: "Sinha, Prokash" To: freebsd-toolchain Subject: elf linking problem Thread-Topic: elf linking problem Thread-Index: AQHQMTzB7oEYrYSqIUWAPLQ9gqdZQw== Date: Fri, 16 Jan 2015 03:30:20 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [71.92.229.68] authentication-results: spf=none (sender IP is ) smtp.mailfrom=psinha@panasas.com; x-dmarcaction-test: None x-microsoft-antispam: BCL:0;PCL:0;RULEID:(3005004);SRVR:DM2PR0801MB649; x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:;SRVR:DM2PR0801MB649; x-forefront-prvs: 04583CED1A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(164054003)(199003)(189002)(105586002)(106356001)(106116001)(64706001)(110136001)(99286002)(66066001)(229853001)(107886001)(46102003)(97736003)(92566002)(87936001)(2656002)(54356999)(86362001)(19580395003)(101416001)(122556002)(102836002)(2900100001)(50986999)(36756003)(77156002)(62966003)(68736005)(450100001)(77096005)(40100003)(94096001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0801MB649; H:DM2PR0801MB652.namprd08.prod.outlook.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: panasas.com does not designate permitted sender hosts) Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: panasas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jan 2015 03:30:20.7901 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: acf01c9d-c699-42af-bdbb-44bf582e60b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0801MB649 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 05:05:30 -0000 Hello, I'm trying to find out what could be the cause of a kldload problem I'm facing. Here is the context detail -- 1. I'm building two ko module. And it has a dependency order, so when I load the first module, it loads, and a function symbol ( F ) is defined into kernel variable space sysctl -b kern.function_list | tr '\0' '\n' | grep symname. 2. Now trying to load the 2nd module, and link_elf_obj flags error and symbol undefined when freebsd10.1 is being used. 3. If I probe using the same sysctl as in step 1, I still the symbol is defined. /var/log/messages shows - kernel: link_elf_obj: symbol pan_sys_once undefined kernel: linker_load_file: Unsupported file type The same two modules when complied using freebsd7.2, we don't see the problem. The question is - Is there changes along the elf formats ( in both case it 64bit), also is there any changes In the API between those two OS version, that I need to aware of ( and possible flags I need to set). Using objdump -t modone.ko 00000000000fb940 g F .text 0000000000000062 pan_sys_once In modtwo.ko it is undefined 0000000000000000 *UND* 0000000000000000 pan_sys_once Note the objdump on freebsd 7.2, is identical. So it is defined in the module1 as F(function), and undefined(UND) in module two. Any suggestion, please ? Thanks, -prokash