* SIGILL when dynamic linking without -Wl,-Bsymbolic-functions @ 2012-05-28 4:52 Isaac Dunham 2012-05-28 8:10 ` Szabolcs Nagy 2012-05-28 13:10 ` Rich Felker 0 siblings, 2 replies; 5+ messages in thread From: Isaac Dunham @ 2012-05-28 4:52 UTC (permalink / raw) To: musl When -Wl,-Bsymbolic-functions is disabled in the makefile, musl cannot be used for dynamic linking. However, the -Bsymbolic-functions option was added in binutils 2.17.50 (a CVS/git version, not a release); this was apparently just prior to the license switch. As a result, it will be impossible to use Aboriginal Linux packages to generate a version capable of dynamic linking. I'm pretty sure this used to work...but I don't remember when I tested it last. I think it was somewhere around 0.8.1-0.8.5. Isaac Dunham ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: SIGILL when dynamic linking without -Wl,-Bsymbolic-functions 2012-05-28 4:52 SIGILL when dynamic linking without -Wl,-Bsymbolic-functions Isaac Dunham @ 2012-05-28 8:10 ` Szabolcs Nagy 2012-05-28 13:10 ` Rich Felker 1 sibling, 0 replies; 5+ messages in thread From: Szabolcs Nagy @ 2012-05-28 8:10 UTC (permalink / raw) To: musl * Isaac Dunham <idunham@lavabit.com> [2012-05-27 21:52:56 -0700]: > When -Wl,-Bsymbolic-functions is disabled in the makefile, musl > cannot be used for dynamic linking. > However, the -Bsymbolic-functions option was added in binutils 2.17.50 > (a CVS/git version, not a release); this was apparently just prior to > the license switch. > > As a result, it will be impossible to use Aboriginal Linux packages to > generate a version capable of dynamic linking. > why? if it was added prior to the license change then i dont see the problem http://sourceware.org/git/?p=binutils.git;a=blob;f=ld/ChangeLog-2007#l1137 vs http://sourceware.org/git/?p=binutils.git;a=commit;h=27adf0212c3d5372805fcb6d2759cca069403b8f ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: SIGILL when dynamic linking without -Wl,-Bsymbolic-functions 2012-05-28 4:52 SIGILL when dynamic linking without -Wl,-Bsymbolic-functions Isaac Dunham 2012-05-28 8:10 ` Szabolcs Nagy @ 2012-05-28 13:10 ` Rich Felker 2012-05-29 6:03 ` Isaac Dunham 1 sibling, 1 reply; 5+ messages in thread From: Rich Felker @ 2012-05-28 13:10 UTC (permalink / raw) To: musl On Sun, May 27, 2012 at 09:52:56PM -0700, Isaac Dunham wrote: > When -Wl,-Bsymbolic-functions is disabled in the makefile, musl > cannot be used for dynamic linking. > However, the -Bsymbolic-functions option was added in binutils 2.17.50 > (a CVS/git version, not a release); this was apparently just prior to > the license switch. > > As a result, it will be impossible to use Aboriginal Linux packages to > generate a version capable of dynamic linking. > > I'm pretty sure this used to work...but I don't remember when I tested > it last. I think it was somewhere around 0.8.1-0.8.5. It's always been this way. In principle -fvisibility=protected should be able to do the same thing on earlier GCC's, but it doesn't work right. You could also try -fPIE instead of -fPIC; that might work. As a last resort, -Bsymbolic will work, but it will do too much and will break any applications that access global vars in libc (like optarg, environ, etc.). I thought Rob said he was going to patch -Bsymbolic-functions into his binutils, but I guess he never did... Rich ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: SIGILL when dynamic linking without -Wl,-Bsymbolic-functions 2012-05-28 13:10 ` Rich Felker @ 2012-05-29 6:03 ` Isaac Dunham 2012-05-29 7:04 ` Szabolcs Nagy 0 siblings, 1 reply; 5+ messages in thread From: Isaac Dunham @ 2012-05-29 6:03 UTC (permalink / raw) To: musl On Mon, 28 May 2012 09:10:19 -0400 Rich Felker <dalias@aerifal.cx> wrote: > On Sun, May 27, 2012 at 09:52:56PM -0700, Isaac Dunham wrote: > > When -Wl,-Bsymbolic-functions is disabled in the makefile, musl > > cannot be used for dynamic linking. > > However, the -Bsymbolic-functions option was added in binutils > > 2.17.50 (a CVS/git version, not a release); this was apparently > > just prior to the license switch. > > > > As a result, it will be impossible to use Aboriginal Linux packages > > to generate a version capable of dynamic linking. > > > > I'm pretty sure this used to work...but I don't remember when I > > tested it last. I think it was somewhere around 0.8.1-0.8.5. > > It's always been this way. In principle -fvisibility=protected should > be able to do the same thing on earlier GCC's, but it doesn't work > right. You could also try -fPIE instead of -fPIC; that might work. As > a last resort, -Bsymbolic will work, but it will do too much and will > break any applications that access global vars in libc (like optarg, > environ, etc.). Won't build with -fvisibility=protected: /opt/musl/bin/ld: src/ldso/dynlink.lo: relocation R_386_GOTOFF against protected function `_dl_debug_state' can not be used when making a shared object /opt/musl/bin/ld: final link failed: Bad value collect2:ld returned 1 exit status make: *** [lib/libc.so] Error 1 Due to some sort of memory lapse, I also tried -fvisibility=hidden. As might be expected, this did not work (segfault). -fPIE does not work (Illegal instruction) I guess I have to see if I can coerce autoconf into working properly. I have makeinfo installed, but the check in binutils-2.17.50-x doesn't recognize it... > I thought Rob said he was going to patch -Bsymbolic-functions into his > binutils, but I guess he never did... He said it was on his todo list (in the 50's)...which AFAIK means "maybe in a year or two, if that soon". ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: SIGILL when dynamic linking without -Wl,-Bsymbolic-functions 2012-05-29 6:03 ` Isaac Dunham @ 2012-05-29 7:04 ` Szabolcs Nagy 0 siblings, 0 replies; 5+ messages in thread From: Szabolcs Nagy @ 2012-05-29 7:04 UTC (permalink / raw) To: musl * Isaac Dunham <idunham@lavabit.com> [2012-05-28 23:03:09 -0700]: > I have makeinfo installed, but the check in binutils-2.17.50-x doesn't > recognize it... > > > I thought Rob said he was going to patch -Bsymbolic-functions into his > > binutils, but I guess he never did... > He said it was on his todo list (in the 50's)...which AFAIK means "maybe > in a year or two, if that soon". i'd just do git clone git://sourceware.org/git/binutils.git binutils-2007-07-16 cd binutils-2007-07-16 git checkout -b gpl2 e6170bec011e801682d614aab989ef4b8b60e8d1 and work from there.. or back port the -Bsymbolic-functions changes made in 2007-01 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-29 7:04 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-05-28 4:52 SIGILL when dynamic linking without -Wl,-Bsymbolic-functions Isaac Dunham 2012-05-28 8:10 ` Szabolcs Nagy 2012-05-28 13:10 ` Rich Felker 2012-05-29 6:03 ` Isaac Dunham 2012-05-29 7:04 ` Szabolcs Nagy
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/musl/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).