1 |
On Tue, 2018-10-30 at 09:44 -0700, Zac Medico wrote: |
2 |
> On 10/29/2018 09:46 AM, Michał Górny wrote: |
3 |
> > Run RANLIB after stripping static archives in order to fix potentially |
4 |
> > mangled LTO symbol indexes. According to the user's report, strip lacks |
5 |
> > support for LTO symbols (and for binutils plugins that could add |
6 |
> > the missing support) and breaks them. Upstream suggests fixing |
7 |
> > the archive by running ranlib -- and since there should be no harm |
8 |
> > in doing that, we can do that unconditionally. |
9 |
> > |
10 |
> > Reported-by: Shane Peelar |
11 |
> > Bug: https://github.com/mgorny/portage-mgorny/issues/21 |
12 |
> > Signed-off-by: Michał Górny <mgorny@g.o> |
13 |
> > --- |
14 |
> > bin/estrip | 5 +++-- |
15 |
> > 1 file changed, 3 insertions(+), 2 deletions(-) |
16 |
> > |
17 |
> > diff --git a/bin/estrip b/bin/estrip |
18 |
> > index 369755cfe..f72341da9 100755 |
19 |
> > --- a/bin/estrip |
20 |
> > +++ b/bin/estrip |
21 |
> > @@ -113,7 +113,7 @@ if [[ ${KERNEL} == linux ]] && ${FEATURES_xattr} ; then |
22 |
> > fi |
23 |
> > |
24 |
> > # look up the tools we might be using |
25 |
> > -for t in STRIP:strip OBJCOPY:objcopy READELF:readelf ; do |
26 |
> > +for t in STRIP:strip OBJCOPY:objcopy READELF:readelf RANLIB:ranlib ; do |
27 |
> > v=${t%:*} # STRIP |
28 |
> > t=${t#*:} # strip |
29 |
> > eval ${v}=\"${!v:-${CHOST}-${t}}\" |
30 |
> > @@ -423,7 +423,8 @@ do |
31 |
> > # linked in (only for finally linked ELFs), so we have to |
32 |
> > # retain the debug info in the archive itself. |
33 |
> > if ! ${FEATURES_splitdebug} || ${RESTRICT_splitdebug} ; then |
34 |
> > - ${STRIP} -g "${x}" |
35 |
> > + ${STRIP} -g "${x}" && |
36 |
> > + ${RANLIB} "${x}" |
37 |
> > fi |
38 |
> > fi |
39 |
> > elif [[ ${f} == *"SB executable"* || ${f} == *"SB pie executable"* || |
40 |
> > |
41 |
> |
42 |
> Looks good, please merge and include a reference to |
43 |
> https://bugs.gentoo.org/603594. |
44 |
|
45 |
Merged, thanks. |
46 |
|
47 |
-- |
48 |
Best regards, |
49 |
Michał Górny |