From patchwork Thu Sep 28 12:23:08 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: 23195 Received: (qmail 89265 invoked by alias); 28 Sep 2017 12:23:18 -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 89254 invoked by uid 89); 28 Sep 2017 12:23:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f68.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=w/7Ye5p5uCieusJMX90CugKSrSM/8dMVoe4mwLBK/Wo=; b=SQuUlw9PUzeNao1uUjy4mM4rM1OXb2dImgVwNWIv6kXfG84kg3TJg5FRWVNi64m2Tf yvKkWbdmLeR5moMdW66vvmCkFJ2ufT4HGrpoDdAQwHTSfg3nPWgw6vznm4xIhwZHw6SD zctvs9wMfcavDu411D02Oo7TYBonnlR9RJ94T4kuJjdZaTszAqwF8d1/ZMUSMbvk67X3 rOxqCcsEfmziQDHMrorfhXhdAOXjLJw2yju03t/vMNwDsjPTAfz+pHi+Avtd/MZk3SGI eusH8VbydjElaKArMAEIKG7VqDb4oFZxpC1VNyrn7Z56EfaNcJyf7J6blt9FSyh3qJxJ 5gtA== X-Gm-Message-State: AMCzsaWgsk6Cx+hY6TaerpcZcsZgJFppWBRqF3S6APrlIArrsMeyk3Di bSgDbYfRzuwXu5QizZs3W3iOdrwc X-Google-Smtp-Source: AOwi7QDP7tydJFmEqCiDKVCGWrIeEK3TIt3TtLH3zplSlIjeLdWEQm3ew9u0sYkLq+COUrkcidCdsQ== X-Received: by 10.202.188.197 with SMTP id m188mr216746oif.270.1506601395208; Thu, 28 Sep 2017 05:23:15 -0700 (PDT) Date: Thu, 28 Sep 2017 05:23:08 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] Add a test for non-PIE static executable Message-ID: <20170928122308.GA5544@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.8.3 (2017-05-23) tst-tls1-static-non-pie is built with $(no-pie-ldflag) to make it a non-PIE static executable, regardless if --enable-static-pie is used to configure glibc. Any comments? H.J. --- * elf/Makefile (tests-static-internal): Add tst-tls1-static-non-pie. (LDFLAGS-tst-tls1-static-non-pie): New. * elf/tst-tls1-static-non-pie.c: New file. --- elf/Makefile | 5 ++++- elf/tst-tls1-static-non-pie.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 elf/tst-tls1-static-non-pie.c diff --git a/elf/Makefile b/elf/Makefile index e21f37e30b..c6edebd4ee 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -149,7 +149,10 @@ tests-static-normal := tst-leaks1-static tst-array1-static tst-array5-static \ tst-tlsalign-static tst-tlsalign-extern-static \ tst-linkall-static tst-env-setuid tst-env-setuid-tunables tests-static-internal := tst-tls1-static tst-tls2-static \ - tst-ptrguard1-static tst-stackguard1-static + tst-ptrguard1-static tst-stackguard1-static \ + tst-tls1-static-non-pie + +LDFLAGS-tst-tls1-static-non-pie = $(no-pie-ldflag) tests := tst-tls9 tst-leaks1 \ tst-array1 tst-array2 tst-array3 tst-array4 tst-array5 \ diff --git a/elf/tst-tls1-static-non-pie.c b/elf/tst-tls1-static-non-pie.c new file mode 100644 index 0000000000..a01008073b --- /dev/null +++ b/elf/tst-tls1-static-non-pie.c @@ -0,0 +1 @@ +#include "tst-tls1.c"