From patchwork Thu Nov 30 22:54:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 843213 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-87696-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="YZinReHM"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ynt5j6pzzz9sNV for ; Fri, 1 Dec 2017 09:55:05 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :mime-version:content-type; q=dns; s=default; b=UmaW+1gkz9oPtffj hdRas9xWEIEE/GmkTmQekfhVSrUlZ5JVysxXF9VVCJilIjcCihoHJp5O6qoQNFIf z4eB4UUg/GiL32EOhL7R24SCoFeHZ1JMEIzZ3qvQ8I0T3i3wplSZFIA4ifJIHvz8 83XYyqygHL8SHkx22w/mfJRpCNg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :mime-version:content-type; s=default; bh=q4wbvKeeg3jfPpvbuvQJb5 ynIf8=; b=YZinReHMR46gYazCFoqpuXVXqSYOC8C+zV8h5pG90Xvsv7QlFFdfS7 aCKoMUffb9MmAiA6tKhVH5NHHIJ+APSp88euXQhI3qHlWpJSBAjUanycy+T8uuFI XzjpBIZfFz2bLuICdu+61BjBwgBXVGfb2HJPDV9VcqzBW1CH+K800= Received: (qmail 36731 invoked by alias); 30 Nov 2017 22:55:00 -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 36719 invoked by uid 89); 30 Nov 2017 22:55:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KB_WAM_FROM_NAME_SINGLEWORD, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mga04.intel.com X-ExtLoop1: 1 Date: Thu, 30 Nov 2017 14:54:56 -0800 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] mips: Don't use MIN in dl-machine.h Message-ID: <20171130225456.GA51351@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) MIN is used, but param.h may not be included, so expand its single use inline. Tested with build-many-glibcs.py. OK for master? H.J. --- * sysdeps/mips/dl-machine.h (elf_machine_reloc): Expand MIN. --- sysdeps/mips/dl-machine.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index da9d6332ea..904824b908 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -695,7 +695,8 @@ elf_machine_reloc (struct link_map *map, ElfW(Addr) r_info, RTLD_PROGNAME, strtab + refsym->st_name); } memcpy (reloc_addr, (void *) value, - MIN (sym->st_size, refsym->st_size)); + sym->st_size < refsym->st_size + ? sym->st_size : refsym->st_size); break; }