From patchwork Thu Oct 24 13:45:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 35276 Received: (qmail 76493 invoked by alias); 24 Oct 2019 13:45:39 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 76358 invoked by uid 89); 24 Oct 2019 13:45:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HCc:U*carlos, HX-Languages-Length:1514 X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571924719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t/Yd7ws0cb6WAyxWlFgPtKkty+UYrpCSQEGfBNQqXaI=; b=dVtxP3n2TWgaO9Xrk9QbrCebPD0OIqSAe0GTWGlalZQN8Z0dl+k0moIFUQs96Wi3ZRBv1+ /c9yUi9PeDvIocVY+Y1KyENSKqQ4cV2kM03cuV1HZ4tVf2zO6ic++DrSkXf5uTPs8bMXOR Rix6rF8kbSOz4Ay4JvwPhLUOlr7jg5o= From: Florian Weimer To: libc-alpha@sourceware.org Cc: Carlos O'Donell , Samuel Thibault Subject: [PATCH] hurd: Fix build after __pread64 usage in the dynamic loader Date: Thu, 24 Oct 2019 15:45:11 +0200 Message-ID: <87blu6cl5k.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 Commit 95c1056962a3f2297c94ce47f0eaf0c5b6563231 ("elf: Use nocancel pread64() instead of lseek()+read()") added calls to __pread64 to the dynamic loader. On Hurd, this needs an implementation in the dynamic loader because the rtld-pread64 rebuild pulls in too many symbols. Fixes: 95c1056962a3f2297c94ce47f0eaf0c5b6563231 ----- sysdeps/mach/hurd/dl-sysdep.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) Reviewed-by: Samuel Thibault diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index 219475aa7d..719d603f44 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -357,9 +357,9 @@ __close (int fd) return 0; } -check_no_hidden(__read); +check_no_hidden(__pread64); __ssize_t weak_function -__read (int fd, void *buf, size_t nbytes) +__pread64 (int fd, void *buf, size_t nbytes, off64_t offset) { error_t err; char *data; @@ -367,7 +367,7 @@ __read (int fd, void *buf, size_t nbytes) data = buf; nread = nbytes; - err = __io_read ((mach_port_t) fd, &data, &nread, -1, nbytes); + err = __io_read ((mach_port_t) fd, &data, &nread, offset, nbytes); if (err) return __hurd_fail (err); @@ -379,6 +379,14 @@ __read (int fd, void *buf, size_t nbytes) return nread; } +libc_hidden_weak (__pread64) + +check_no_hidden(__read); +__ssize_t weak_function +__read (int fd, void *buf, size_t nbytes) +{ + return __pread64 (fd, buf, nbytes, -1); +} libc_hidden_weak (__read) check_no_hidden(__write);