From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2801 invoked by alias); 31 Jan 2006 19:17:13 -0000 Received: (qmail 2792 invoked by uid 48); 31 Jan 2006 19:17:11 -0000 Date: Tue, 31 Jan 2006 19:17:00 -0000 Message-ID: <20060131191711.2791.qmail@sourceware.org> From: "hjl at lucon dot org" To: glibc-bugs@sources.redhat.com In-Reply-To: <20060131191328.2251.hjl@lucon.org> References: <20060131191328.2251.hjl@lucon.org> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/2251] Weak undefined symbol doesn't work properly with PIE X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00158.txt.bz2 List-Id: ------- Additional Comments From hjl at lucon dot org 2006-01-31 19:17 ------- Created an attachment (id=854) --> (http://sourceware.org/bugzilla/attachment.cgi?id=854&action=view) A testcase PIE built with the fixed linker, I got gcc -B./ -c -fPIC -g bar.c gcc -B./ -shared -o libbar.so bar.o #-z nocombreloc gcc -B./ -c -fPIC -g foo.c gcc -B./ -c -fPIC -g main.c gcc -B./ -c -fPIC -g dummy.c gcc -B./ -shared -o libdummy.so dummy.o #-z nocombreloc gcc -B./ -pie -o pie foo.o main.o libdummy.so -Wl,-z,nocombreloc -Wl,-rpath,. gcc -B./ -o exec foo.o main.o libdummy.so -Wl,-z,nocombreloc -Wl,-rpath,. cp -af libbar.so libdummy.so ./exec main foo PASSED ./pie main foo FAILED That is undefined weak symbol in PIE is resolved to a definition in libdummy.so unlike the normal executable. -- http://sourceware.org/bugzilla/show_bug.cgi?id=2251 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.