From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58306 invoked by alias); 2 Jul 2019 18:40:54 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 58296 invoked by uid 89); 2 Jul 2019 18:40:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-14.4 required=5.0 tests=BAYES_00,GIT_PATCH_1,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=worries, HX-Received:a37, algn, chrome X-Spam-Status: No, score=-14.4 required=5.0 tests=BAYES_00,GIT_PATCH_1,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mail-qk1-f195.google.com Received: from mail-qk1-f195.google.com (HELO mail-qk1-f195.google.com) (209.85.222.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Jul 2019 18:40:52 +0000 Received: by mail-qk1-f195.google.com with SMTP id i125so15118016qkd.6 for ; Tue, 02 Jul 2019 11:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oQhYbJdJYO+PLnnh85qmoOsV7T+3uWVAWurAJLv4F9s=; b=HCC+YDYHrE5fIRToJS+Lp0Hq5qRhLF71zBsGQCeOAsuoYVUG2/9/R4ifxkwy+m4mGx vV4VLCN2bJNRJkMXmDrG3onSB+MHnb9/R4zhqHgLkgXSg2YiFOSOy1SiUtz1RD75YLUq F42/J1f6160wYwrrIe2JiZyRCjXga36wFOGbw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oQhYbJdJYO+PLnnh85qmoOsV7T+3uWVAWurAJLv4F9s=; b=t3w3VSXhoyLJ+2dLvPrkSzPrpDkAergAH+BHSimXeglVwk4SDXqqE4Hmqh6erqseEw /pjPh0Zsp+vAyw6+tB4XPxS5qb9e87Xh3yUfEjzF23ouMsxvYFLbsCOUH9lHpl4JvaDk /XaFD0gY5s55nXlxpfo4TiriieQxSm5gmPs19BnDtFJVMPgafofXJeJGD9kPw1Q/S6mK XhicYmJUaw1SPIUhCz63PCra1lZc5Y/sin/Cneiqyp5u3G5plsEmHOSBWYf9mcPF3EyP ziWYxI94zpfn7/WLHFYgWOueDpyJQfVbjFz0lK4O6lTjDBRyhHnwDd2ywUfyKkabnKX0 SAVw== X-Gm-Message-State: APjAAAUQVkdwf67ko39pxWkJ2LHr6Gs1b3GavAPOEmCymFJG0CwUF/C3 NoQIq9lJ9iCbpyB2RRpgsS2+KGhJiVBN9axtqiMaDQ== X-Google-Smtp-Source: APXvYqyCje2WQmjoZfViSdYKHs7QzREldy1gCyfryy0v5xtHhHIqhlNxu9sdQgwp/KfTYbVTTptoi/Vwb+q/THIme0U= X-Received: by 2002:a37:8fc4:: with SMTP id r187mr26913826qkd.113.1562092850466; Tue, 02 Jul 2019 11:40:50 -0700 (PDT) MIME-Version: 1.0 References: <1560902643-20602-1-git-send-email-mark@klomp.org> In-Reply-To: <1560902643-20602-1-git-send-email-mark@klomp.org> From: Lei Zhang Date: Tue, 02 Jul 2019 18:40:00 -0000 Message-ID: Subject: Re: [PATCH] libelf: Fix some 32bit offset/size issues that break updating 4G+ files. To: Mark Wielaard Cc: elfutils-devel@sourceware.org, fche@redhat.com, mcermak@redhat.com, Dirk Pranke , Thomas Anderson Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-q3/txt/msg00001.txt.bz2 On Tue, Jun 18, 2019 at 5:04 PM Mark Wielaard wrote: > My apologies if you tried to upstream this and I missed it. But I think > the patch below is a more complete fix. If you could test it in your > setup that would be great. Hi Mark, I'm not sure if we tried to upstream the patch. So no worries there. I tested and found some problems. My test procedure is to: - Build elfutils at commit 31c8b3f098b0654db8f573b2a15d5b6d07d4d3b0 - Replace Chromium's buildtools/third_party/eu-strip/bin/eu-strip with the newly built strip binary. - Do an "official" Chromium build, with the following Chromium GN build config: is_debug = false is_official_build = true strip_absolute_paths_from_debug_symbols = true use_goma = true This generates a 5.4 GB binary named "chrome" and then splits it into "chrome.debug" and "chrome.stripped" using the strip command. Running "objdump -x chrome.debug", I see the following in the "Dynamic Section" output: Sections: Idx Name Size VMA LMA File off Algn 0 .interp 0000001c 00000000000002e0 00000000000002e0 000002e0 2**0 ALLOC, READONLY ... 40 .debug_loc 22f253c9 0000000000000000 0000000000000000 c8e11f1b 2**0 CONTENTS, READONLY, DEBUGGING 41 .debug_str 3176443a 0000000000000000 0000000000000000 ebd372e4 2**0 CONTENTS, READONLY, DEBUGGING 42 .debug_ranges 053cdc00 0000000000000000 0000000000000000 1d49b71e 2**0 CONTENTS, READONLY, DEBUGGING 43 .debug_macinfo 000064fb 0000000000000000 0000000000000000 2286931e 2**0 CONTENTS, READONLY, DEBUGGING 44 .debug_frame 011dfe98 0000000000000000 0000000000000000 2286f820 2**3 CONTENTS, READONLY, DEBUGGING 45 .gdb_index 24d27f19 0000000000000000 0000000000000000 23a4f6b8 2**0 CONTENTS, READONLY, DEBUGGING Here, section 42 has the wrong file offset. It should be 0x11d49b71e, since the file offset and size of section 41 is 0xebd372e4 + 0x3176443a. If I restore buildtools/third_party/eu-strip/bin/eu-strip back to the original, and rebuild, then that generates the right chrome.debug output.