From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19958 invoked by alias); 23 Feb 2008 21:10:11 -0000 Received: (qmail 19814 invoked by uid 48); 23 Feb 2008 21:09:29 -0000 Date: Sat, 23 Feb 2008 21:10:00 -0000 Message-ID: <20080223210929.19813.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/32219] optimizer causes wrong code in pic/hidden/weak symbol checking. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pluto at agmk dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg02505.txt.bz2 ------- Comment #5 from pluto at agmk dot net 2008-02-23 21:09 ------- (In reply to comment #3) > (In reply to comment #2) > > > Also you should be using -PIE when linking. > > hmm, it doesn't work with int main(); > > $ gcc -s main.c -fpie -Wl,-pie > /usr/bin/ld: /usr/lib64/crt1.o: relocation R_X86_64_32S against > `__libc_csu_fini' can not be used when making a shared object; > recompile with -fPIC > /usr/lib64/crt1.o: could not read symbols: Bad value > collect2: ld returned 1 exit status > > huh, glibc bug, linker bug? with gcc-4.2.3 and binutils-2.18.50.0.4 it links fine. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32219