From patchwork Mon Jan 16 13:29:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tulio Magno Quites Machado Filho X-Patchwork-Id: 18918 Received: (qmail 19258 invoked by alias); 16 Jan 2017 13:30:17 -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 18042 invoked by uid 89); 16 Jan 2017 13:30:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=!defined, Machado, machado, H*MI:vnet X-HELO: mx0a-001b2d01.pphosted.com From: "Tulio Magno Quites Machado Filho" To: libc-alpha@sourceware.org, joseph@codesourcery.com Cc: acsawdey@linux.vnet.ibm.com, segher@kernel.crashing.org, siddhesh@sourceware.org Subject: [PATCH 2.25] powerpc: Avoid calling strncmp via PLT on GCC 7 Date: Mon, 16 Jan 2017 11:29:19 -0200 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17011613-0020-0000-0000-0000027B98F2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17011613-0021-0000-0000-00003095E75D Message-Id: <1484573359-7879-1-git-send-email-tuliom@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-01-16_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1701160204 This patch only fixes the issue on elf/check-localplt. In case you notice any other test failures when comparing strings on GCC 7, please refer to this patch: https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00744.html -- 8< -- GCC 7 added support for a strncmp built-in for POWER7, generating PLT calls to strncmp from libc. 2017-01-16 Tulio Magno Quites Machado Filho * sysdeps/powerpc/symbol-hacks.h: New file. Enforce strncmp calls don't go through the PLT. --- sysdeps/powerpc/symbol-hacks.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sysdeps/powerpc/symbol-hacks.h diff --git a/sysdeps/powerpc/symbol-hacks.h b/sysdeps/powerpc/symbol-hacks.h new file mode 100644 index 0000000..7558b18 --- /dev/null +++ b/sysdeps/powerpc/symbol-hacks.h @@ -0,0 +1,7 @@ +#include + +/* GCC 7.0 added support for a builtin strncmp that is used on POWER >= 7. */ +#if !defined __ASSEMBLER__ && IS_IN (libc) && defined SHARED \ + && defined _ARCH_PWR7 +asm ("strncmp = __GI_strncmp"); +#endif