* libgcc_s.so not stripped
@ 2012-08-22 20:15 Enrico Scholz
2012-08-22 20:25 ` Khem Raj
0 siblings, 1 reply; 7+ messages in thread
From: Enrico Scholz @ 2012-08-22 20:15 UTC (permalink / raw)
To: openembedded-core
Hi,
I just noticed that libgcc_s.so.1 is not stripped in the .ipk. Is
there any reason to keep the debug symbols? Uncompressed, this makes a
difference of more than 1 MB.
Enrico
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: libgcc_s.so not stripped
2012-08-22 20:15 libgcc_s.so not stripped Enrico Scholz
@ 2012-08-22 20:25 ` Khem Raj
2013-03-03 17:04 ` [PATCH] libgcc: Mark libgcc_s as executable to ensure its stripped Richard Purdie
2013-03-03 17:08 ` libgcc_s.so not stripped Richard Purdie
0 siblings, 2 replies; 7+ messages in thread
From: Khem Raj @ 2012-08-22 20:25 UTC (permalink / raw)
To: Enrico Scholz; +Cc: openembedded-core
On Wed, Aug 22, 2012 at 1:15 PM, Enrico Scholz
<enrico.scholz@sigma-chemnitz.de> wrote:
>
> I just noticed that libgcc_s.so.1 is not stripped in the .ipk. Is
> there any reason to keep the debug symbols? Uncompressed, this makes a
> difference of more than 1 MB.
I dont see a reason to have debug info there. Symbol table probably
should be left in.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] libgcc: Mark libgcc_s as executable to ensure its stripped
2012-08-22 20:25 ` Khem Raj
@ 2013-03-03 17:04 ` Richard Purdie
2013-03-04 20:06 ` Khem Raj
2013-03-03 17:08 ` libgcc_s.so not stripped Richard Purdie
1 sibling, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2013-03-03 17:04 UTC (permalink / raw)
To: Khem Raj; +Cc: Enrico Scholz, openembedded-core
libgcc_s is not marked as executable and hence it doesn't get stripped. This
means its about 1MB larger than it needs to be. There is no good reason it
shouldn't get stripped so ensure it does and mark as executable.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/recipes-devtools/gcc/libgcc_4.7.bb b/meta/recipes-devtools/gcc/libgcc_4.7.bb
index 47669a2..6a0931f 100644
--- a/meta/recipes-devtools/gcc/libgcc_4.7.bb
+++ b/meta/recipes-devtools/gcc/libgcc_4.7.bb
@@ -57,6 +57,9 @@ do_install () {
# install the runtime in /usr/lib/ not in /usr/lib/gcc on target
# so that cross-gcc can find it in the sysroot
+ # Ensure libs are executable else they aren't stripped
+ chmod a+x ${D}/${base_libdir}/*
+
mv ${D}${libdir}/gcc/* ${D}${libdir}
rm -rf ${D}${libdir}/gcc/
# unwind.h is installed here which is shipped in gcc-cross
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] libgcc: Mark libgcc_s as executable to ensure its stripped
2013-03-03 17:04 ` [PATCH] libgcc: Mark libgcc_s as executable to ensure its stripped Richard Purdie
@ 2013-03-04 20:06 ` Khem Raj
2013-03-05 13:33 ` Richard Purdie
0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2013-03-04 20:06 UTC (permalink / raw)
To: Richard Purdie; +Cc: Enrico Scholz, openembedded-core
On Sun, Mar 3, 2013 at 9:04 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> libgcc_s is not marked as executable and hence it doesn't get stripped. This
> means its about 1MB larger than it needs to be. There is no good reason it
> shouldn't get stripped so ensure it does and mark as executable.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/recipes-devtools/gcc/libgcc_4.7.bb b/meta/recipes-devtools/gcc/libgcc_4.7.bb
> index 47669a2..6a0931f 100644
> --- a/meta/recipes-devtools/gcc/libgcc_4.7.bb
> +++ b/meta/recipes-devtools/gcc/libgcc_4.7.bb
> @@ -57,6 +57,9 @@ do_install () {
> # install the runtime in /usr/lib/ not in /usr/lib/gcc on target
> # so that cross-gcc can find it in the sysroot
>
> + # Ensure libs are executable else they aren't stripped
> + chmod a+x ${D}/${base_libdir}/*
> +
hmmm, while this solves the issue I think better fix would for
stripper to know that its a shared object
and can be stripped. Marking libraries with exe (except ld.so which
can execute on its own) seems not
right to me.
> mv ${D}${libdir}/gcc/* ${D}${libdir}
> rm -rf ${D}${libdir}/gcc/
> # unwind.h is installed here which is shipped in gcc-cross
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] libgcc: Mark libgcc_s as executable to ensure its stripped
2013-03-04 20:06 ` Khem Raj
@ 2013-03-05 13:33 ` Richard Purdie
0 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2013-03-05 13:33 UTC (permalink / raw)
To: Khem Raj; +Cc: Enrico Scholz, openembedded-core
On Mon, 2013-03-04 at 12:06 -0800, Khem Raj wrote:
> On Sun, Mar 3, 2013 at 9:04 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > libgcc_s is not marked as executable and hence it doesn't get stripped. This
> > means its about 1MB larger than it needs to be. There is no good reason it
> > shouldn't get stripped so ensure it does and mark as executable.
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> > diff --git a/meta/recipes-devtools/gcc/libgcc_4.7.bb b/meta/recipes-devtools/gcc/libgcc_4.7.bb
> > index 47669a2..6a0931f 100644
> > --- a/meta/recipes-devtools/gcc/libgcc_4.7.bb
> > +++ b/meta/recipes-devtools/gcc/libgcc_4.7.bb
> > @@ -57,6 +57,9 @@ do_install () {
> > # install the runtime in /usr/lib/ not in /usr/lib/gcc on target
> > # so that cross-gcc can find it in the sysroot
> >
> > + # Ensure libs are executable else they aren't stripped
> > + chmod a+x ${D}/${base_libdir}/*
> > +
>
> hmmm, while this solves the issue I think better fix would for
> stripper to know that its a shared object
> and can be stripped. Marking libraries with exe (except ld.so which
> can execute on its own) seems not
> right to me.
Agreed, I've pushed something which addresses the root cause in
package.bbclass.
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: libgcc_s.so not stripped
2012-08-22 20:25 ` Khem Raj
2013-03-03 17:04 ` [PATCH] libgcc: Mark libgcc_s as executable to ensure its stripped Richard Purdie
@ 2013-03-03 17:08 ` Richard Purdie
2013-03-04 20:03 ` Khem Raj
1 sibling, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2013-03-03 17:08 UTC (permalink / raw)
To: Khem Raj; +Cc: Enrico Scholz, openembedded-core
On Wed, 2012-08-22 at 13:25 -0700, Khem Raj wrote:
> On Wed, Aug 22, 2012 at 1:15 PM, Enrico Scholz
> <enrico.scholz@sigma-chemnitz.de> wrote:
> >
> > I just noticed that libgcc_s.so.1 is not stripped in the .ipk. Is
> > there any reason to keep the debug symbols? Uncompressed, this makes a
> > difference of more than 1 MB.
>
> I dont see a reason to have debug info there. Symbol table probably
> should be left in.
I noticed this when clearing out old emails and I've just posted a patch
for it.
Worryingly, there are other non-executables in the lib directories which
aren't getting stripped. I've opened a bug:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=3973
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: libgcc_s.so not stripped
2013-03-03 17:08 ` libgcc_s.so not stripped Richard Purdie
@ 2013-03-04 20:03 ` Khem Raj
0 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2013-03-04 20:03 UTC (permalink / raw)
To: Richard Purdie; +Cc: Enrico Scholz, openembedded-core
On Sun, Mar 3, 2013 at 9:08 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Wed, 2012-08-22 at 13:25 -0700, Khem Raj wrote:
>> On Wed, Aug 22, 2012 at 1:15 PM, Enrico Scholz
>> <enrico.scholz@sigma-chemnitz.de> wrote:
>> >
>> > I just noticed that libgcc_s.so.1 is not stripped in the .ipk. Is
>> > there any reason to keep the debug symbols? Uncompressed, this makes a
>> > difference of more than 1 MB.
>>
>> I dont see a reason to have debug info there. Symbol table probably
>> should be left in.
yes as long as symbol table is left intact it should work fine.
>
> I noticed this when clearing out old emails and I've just posted a patch
> for it.
>
> Worryingly, there are other non-executables in the lib directories which
> aren't getting stripped. I've opened a bug:
>
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=3973
>
> Cheers,
>
> Richard
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-05 13:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-22 20:15 libgcc_s.so not stripped Enrico Scholz
2012-08-22 20:25 ` Khem Raj
2013-03-03 17:04 ` [PATCH] libgcc: Mark libgcc_s as executable to ensure its stripped Richard Purdie
2013-03-04 20:06 ` Khem Raj
2013-03-05 13:33 ` Richard Purdie
2013-03-03 17:08 ` libgcc_s.so not stripped Richard Purdie
2013-03-04 20:03 ` Khem Raj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox