From owner-freebsd-toolchain@FreeBSD.ORG Wed Feb 11 19:03:47 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E4A183C for ; Wed, 11 Feb 2015 19:03:47 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) (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 E5826BE9 for ; Wed, 11 Feb 2015 19:03:46 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [127.0.1.5]) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BJ3kCY024201 for ; Wed, 11 Feb 2015 19:03:46 GMT (envelope-from root@phabric-backend.isc.freebsd.org) Received: (from root@localhost) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9/Submit) id t1BJ3kFm024200; Wed, 11 Feb 2015 19:03:46 GMT (envelope-from root) Date: Wed, 11 Feb 2015 19:03:46 +0000 To: freebsd-toolchain@freebsd.org From: "emaste (Ed Maste)" Subject: [Differential] [Request, 6 lines] D1826: libdwarf: Add symbol value when processing .rela relocations Message-ID: X-Priority: 3 Thread-Topic: D1826: libdwarf: Add symbol value when processing .rela relocations X-Herald-Rules: none X-Phabricator-To: X-Phabricator-Cc: Thread-Index: ZjAwMzYxOWQ0Y2NkNDBkZjQ5NmIzZDI0ODQx X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" 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: Wed, 11 Feb 2015 19:03:47 -0000 emaste created this revision. emaste added a subscriber: freebsd-toolchain. REVISION SUMMARY In practice .rela debug relocations often use the the .debug_* sections as the symbol, which has the value 0: ``` Relocation section '.rela.debug_info' at offset 0xd18 contains 205 entries: Offset Info Type Sym. Value Sym. Name + Addend 000000000006 001a0000000a R_X86_64_32 0000000000000000 .debug_abbrev + 0 00000000000c 001e0000000a R_X86_64_32 0000000000000000 .debug_str + 0 000000000012 001e0000000a R_X86_64_32 0000000000000000 .debug_str + 45 ``` so in those cases there is no difference if the symbol value is used in the relocation or not. It is not always the case though: ``` 000000000039 002700000001 R_X86_64_64 0000000000000010 xen_pci_driver + 0 ``` REVISION DETAIL https://reviews.freebsd.org/D1826 AFFECTED FILES libdwarf/libdwarf_elf_init.c To: emaste Cc: freebsd-toolchain