From patchwork Fri Dec 1 18:03:07 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: 843641 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-87732-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="C3A90Rse"; 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 3ypMZc5S4Xz9sCZ for ; Sat, 2 Dec 2017 05:03:20 +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=vbXeYePHUpaLTilP MZrX0Dmx7IcebzldRjGEhaVT6xTb3BPJPohiDBnuvtbyxuwQygQx/JLwswAS9Keh 2dJFK8RXOJk4lO7eD7mSkmFjRDmORvDhdYH16viNcN8pO/KZvqWkUE3zWp8QAh2i XOB1YhgnhVHF+RkDij7n979GXfg= 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=vaOGdLZZJq6IMfvu4zSQ5e 8kN6w=; b=C3A90RseL0TloCPS6mcPVxvVxr/VZsio5q5/IWQohzyeDhso3ijktI BeDhOVyf+L1XoSA3v+AosSe89S23pN+d4b9pspTvs6o43jaPQL5JsBMo8+DLEpqf a+W5Lxeth7n9fIAF7E4ErGSQSXcjgroCFI8f+KFNjNYzuksAyQmdg= Received: (qmail 83097 invoked by alias); 1 Dec 2017 18:03:12 -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 83088 invoked by uid 89); 1 Dec 2017 18:03:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=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=Hx-languages-length:798 X-HELO: mga06.intel.com X-ExtLoop1: 1 Date: Fri, 1 Dec 2017 10:03:07 -0800 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] nios2: Don't use MIN in dl-machine.h Message-ID: <20171201180307.GA8255@gmail.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. OK for master? H.J. --- * sysdeps/nios2/dl-machine.h (elf_machine_rela): Expand MIN. --- sysdeps/nios2/dl-machine.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/nios2/dl-machine.h b/sysdeps/nios2/dl-machine.h index b5fdd9b2bd..67d8c899a7 100644 --- a/sysdeps/nios2/dl-machine.h +++ b/sysdeps/nios2/dl-machine.h @@ -271,7 +271,8 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, strtab + refsym->st_name); } memcpy (reloc_addr_arg, (void *) value, - MIN (sym->st_size, refsym->st_size)); + sym->st_size < refsym->st_size + ? sym->st_size : refsym->st_size); break; case R_NIOS2_GLOB_DAT: case R_NIOS2_JUMP_SLOT: