From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 1 13:47:55 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD7BC1065670 for ; Mon, 1 Nov 2010 13:47:55 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4E35B8FC08 for ; Mon, 1 Nov 2010 13:47:55 +0000 (UTC) Received: by eyb7 with SMTP id 7so2781312eyb.13 for ; Mon, 01 Nov 2010 06:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=C8fDZ79MYE6gQfwhrvpVWFXg6fMBlCqacL/s3CyEhKM=; b=o6bL86QJLwpkHpk1EIynpuUTAYNdBPqYrfjus7E8N/RzjxtQ9GVSTHtvIL04PfEmS1 6bF4vIDX6Yom5U74n0iDjJslfovOTyFdlQC/oyhPY9jikcdRJp1gDo+/dXLgYTR8+ayg 72BnIeWiMIcarRhBKb2Nmbl35YhKGCO+t5O64= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=H8ghWWvoWxPZbPKMMDB2Mspm+yf0NYFzmMYQZL+ULowLcIN1pm3S06wtERRA+sbHa2 SYPoSQt6kMhpmUrjMLuojhmY+sr3OR9aAIrwqFcedakyIzCqQi9TWgk4LWvLpL/wZUFf i595OfXFtHZNQhvsjzVyAgtfKmmAHhYeEhjq4= Received: by 10.213.29.145 with SMTP id q17mr13153190ebc.27.1288617607757; Mon, 01 Nov 2010 06:20:07 -0700 (PDT) Received: from localhost (lan-78-157-92-5.vln.skynet.lt [78.157.92.5]) by mx.google.com with ESMTPS id x54sm4191930eeh.17.2010.11.01.06.20.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Nov 2010 06:20:06 -0700 (PDT) Date: Mon, 1 Nov 2010 15:20:00 +0200 From: Gleb Kurtsou To: freebsd-hackers@freebsd.org Message-ID: <20101101132000.GA4016@tops> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: ABI compatibility checker for shared libraries X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2010 13:47:55 -0000 Hi, I'd like to introduce shlib-compat -- an ABI compatibility checker for shared libraries with symbol versioning. The idea of such tool was discussed on mail lists before. shlib-compat uses debugging info (dwarf) from compiled library to compare definitions of exported symbols, i.e. no sources is necessary. Code quality is pre-alpha, loops in struct/union definitions are not handled properly, values for enums and const/volatile are ignored. Reporting is not yet implemented, it has knob to dump complete symbol definitions in json which is rather useless. It just prints if symbol definitions match. shlib-compat parses libc.so.7 on my system (amd64), but there is a lot warnings about symbols it can't find in dwarf dump (looks like these are implemented in asm). Sources contain several trivial test cases. devel/dwarfdump port is required (as well as objdump which is in base). Source code available on github: http://github.com/glk/shlib-compat Or as tarball: http://github.com/downloads/glk/shlib-compat/shlib-compat-0.1.tar.gz I don't have much free time to continue developing it right now, but feel free to add a ticket on github, submit a patch or fork it. Thanks, Gleb.