From patchwork Fri Mar 6 22:26:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 5509 Received: (qmail 128137 invoked by alias); 6 Mar 2015 22:26:46 -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 128124 invoked by uid 89); 6 Mar 2015 22:26:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_FROM_URIBL_PCCC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-oi0-f41.google.com MIME-Version: 1.0 X-Received: by 10.60.74.41 with SMTP id q9mr12968729oev.61.1425680802794; Fri, 06 Mar 2015 14:26:42 -0800 (PST) Date: Fri, 6 Mar 2015 14:26:42 -0800 Message-ID: Subject: Should elf/tst-dlopen-aout.c fail when compiled as PIE? From: "H.J. Lu" To: Paul Pluzhnikov , GNU C Library Hi Pail, You are the author of elf/tst-dlopen-aout.c. Should it fail when it is compiled as PIE? With this patch: selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null) I got [hjl@gnu-6 build-x86_64-linux]$ ./elf/tst-dlopen-aout dlopen unexpectedly succeeded [hjl@gnu-6 build-x86_64-linux]$ diff --git a/elf/Makefile b/elf/Makefile index e852b5f..7edfcb7 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -150,6 +150,8 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ # reldep9 ifeq ($(build-hardcoded-path-in-tests),yes) tests += tst-dlopen-aout +tests-pie += tst-dlopen-aout +CFLAGS-tst-dlopen-aout.c += $(pie-ccflag) endif test-srcs = tst-pathopt