From owner-freebsd-hackers@freebsd.org Sat Nov 3 14:52:15 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E94B10FFF19 for ; Sat, 3 Nov 2018 14:52:15 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 031FE857B4 for ; Sat, 3 Nov 2018 14:52:14 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from imac.bk.cs.huji.ac.il ([132.65.179.42]) by kabab.cs.huji.ac.il with esmtp id 1gIxHK-000M79-Qv for freebsd-hackers@FreeBSD.org; Sat, 03 Nov 2018 16:51:58 +0200 From: Daniel Braniss Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: help with dl module and clang Message-Id: <4B8101F4-9A89-4486-8DF3-93DC799EF6D4@cs.huji.ac.il> Date: Sat, 3 Nov 2018 16:51:58 +0200 To: freebsd-hackers@FreeBSD.org X-Mailer: Apple Mail (2.3445.100.39) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Nov 2018 14:52:15 -0000 Hi, I have a program that loads some modules via dlopen(), these modules = call some routines which are in the main program, this works when using gcc, but with cc it = does not. when compiling the main program I use -export-dynamic, and the modules = link fine when compiled with gcc, but when compiling with clang/cc i get dlerror: ...Undefined symbol = =E2=80=A6 BTW, when linking the main program with cc I get /usr/bin/ld: warning: cannot find entry symbol xport-dynamic; = defaulting to 0000000000402140 thanks, danny PS: I=E2=80=99m running FreeBSD 11.2