diff options
author | Youngsoo Choi <kenshin.choi@samsung.com> | 2017-04-05 19:29:07 +0900 |
---|---|---|
committer | Youngsoo Choi <kenshin.choi@samsung.com> | 2017-04-06 18:45:43 +0900 |
commit | d2c43c408bbb5065cceb2e4598825b28407b0e0e (patch) | |
tree | 27545d2184e0d52997c9a7ad5fa57130c2dcb459 | |
parent | 1b9726c32c05d59eaa67c8bb10a46e43f6ef5321 (diff) | |
download | rpm-d2c43c408bbb5065cceb2e4598825b28407b0e0e.tar.gz rpm-d2c43c408bbb5065cceb2e4598825b28407b0e0e.tar.bz2 rpm-d2c43c408bbb5065cceb2e4598825b28407b0e0e.zip |
fixup! [4.0] Use strip (instead of eu-strip) to support --strip-debug of *.so at build timesubmit/tizen_base/20170410.064620
The command strip has been in use building for chromium-efl like below.
$ strip --remove-section=.comment -o /PATH/TO/libchromium-ewk.so.debug /PATH/TO/libchromium-ewk.so
Also, it has been expected that
the argument libchromium-ewk.so.debug will have section .debug_*
and another argument libchromium-ewk.so will be stripped.
Btw, the libchromium-ewk.so.debug doesn't have the section .debug_*
but the libchromium-ewk.so still has the section.
The argument files need to be switched each other.
With this CL, the libchromium-ewk.so.debug properly has
the section .debug_* like below and libchromium-ewk.so is stripped.
> ...
> 28 .debug_line 048e8963 00000000 00000000 0231a318 2**0
> CONTENTS, READONLY, DEBUGGING
> 29 .debug_info b61b6cbd 00000000 00000000 06c02c7b 2**0
> CONTENTS, READONLY, DEBUGGING
> 30 .debug_abbrev 0349bf7f 00000000 00000000 bcdb9938 2**0
> CONTENTS, READONLY, DEBUGGING
> 31 .debug_aranges 004047a0 00000000 00000000 c02558b8 2**3
> CONTENTS, READONLY, DEBUGGING
> 32 .debug_ranges 015dbc78 00000000 00000000 c065a058 2**3
> CONTENTS, READONLY, DEBUGGING
> ...
> 34 .debug_loc 08b66519 00000000 00000000 c1c35cfd 2**0
> CONTENTS, READONLY, DEBUGGING
> 35 .debug_str 10b85beb 00000000 00000000 ca79c216 2**0
> CONTENTS, READONLY, DEBUGGING
> 36 .debug_frame 00d2f1b4 00000000 00000000 db321e04 2**2
> CONTENTS, READONLY, DEBUGGING
> ...
The file size is like below.
before)
3.5G libchromium-ewk.so
36M libchromium-ewk.so.debug
after)
36M libchromium-ewk.so
3.5G libchromium-ewk.so.debug
Bug: http://suprem.sec.samsung.net/jira/browse/RWASP-807
Change-Id: I11e80373fa9973663ee2c7b2092ae9a5f678cbc8
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
-rw-r--r-- | scripts/find-debuginfo.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index 84629dc04..97e052d94 100644 --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debuginfo.sh @@ -137,9 +137,10 @@ strip_to_debug() # Support an alternative way to choose between strip (binutils) and # eu-strip (elfutils) to handle a large shared object (e.g. chromium) if [ "$STRIP_DEFAULT_PACKAGE" != "binutils" ]; then - eu-strip --remove-comment $g $strip_option -f "$1" "$2" || exit + eu-strip --remove-comment $g $strip_option -f "$1" "$2" || exit else - strip --remove-section=.comment $g $strip_option -o "$1" "$2" || exit + mv $2 $1 + strip --remove-section=.comment $g $strip_option -o "$2" "$1" || exit fi esac chmod 444 "$1" || exit |