mailing list of musl libc
 help / color / mirror / code / Atom feed
* static musl-based gdb and -fPIC
@ 2014-04-20 17:03 writeonce
  2014-04-20 20:29 ` writeonce
  2014-04-20 20:31 ` Rich Felker
  0 siblings, 2 replies; 14+ messages in thread
From: writeonce @ 2014-04-20 17:03 UTC (permalink / raw)
  To: musl

Greetings,

While building a statically linked musl-based gdb, ld asked that libc.a 
be recompiled with -fPIC.  After recompiling musl with the above flag, 
gdb built successfully.  The reason I wanted to have a static gdb (other 
than the trivial ones) was to be able to debug a musl-based python.  The 
distribution's gdb has a dynamic dependency on a glibc-based libpython, 
and the two friends don't play well together.

Now that the static gdb is up and running, my questions are:

1) is there any reason not to "always" compile musl with -fPIC, at least 
on x86_64?

2) is there any reason to revert to the old build of libc.so? Although I 
rebuilt musl because of libc.a, it turns out that the -fPIC flag also 
helped libc.so become much smaller: 699299 bytes, instead of 2767910 
bytes (musl v1.0.0, binutils v2.24).  Any other factors to consider?

Thanks for looking at this,
zg



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-05-22 20:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-20 17:03 static musl-based gdb and -fPIC writeonce
2014-04-20 20:29 ` writeonce
2014-04-20 20:31 ` Rich Felker
2014-04-20 21:39   ` writeonce
2014-04-21  7:33     ` Szabolcs Nagy
2014-04-21  8:21       ` Szabolcs Nagy
2014-04-21 11:16         ` writeonce
2014-04-21 11:16       ` writeonce
2014-04-29 21:40   ` writeonce
2014-04-30  2:57     ` Rich Felker
2014-04-30  3:26       ` writeonce
2014-04-30  4:07         ` Rich Felker
2014-04-30  4:29           ` Zvi Gilboa
2014-05-22 20:14             ` John Spencer

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).