[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/14493] New: "strip" breaks .SUNW_ldynsym section on illumo
From: |
pashev.igor at gmail dot com |
Subject: |
[Bug binutils/14493] New: "strip" breaks .SUNW_ldynsym section on illumos |
Date: |
Sat, 18 Aug 2012 10:18:55 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=14493
Bug #: 14493
Summary: "strip" breaks .SUNW_ldynsym section on illumos
Product: binutils
Version: 2.22
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: address@hidden
ReportedBy: address@hidden
Classification: Unclassified
Created attachment 6586
--> http://sourceware.org/bugzilla/attachment.cgi?id=6586
test_ldynsym-nonstripped-elfdump-s.txt
"strip" damages ELF section ".SUNW_ldynsym" on illumos.
As a result elfdump reports, for example, "libavl.so.1: .SUNW_ldynsym: invalid
sh_link: 0"
And linker cannot link with the resulting library:
"ld: fatal: file libc.so: section [4279087549](null): has invalid sh_info:
-37933168108576"
Here is a minimal example from [1]:
#include <ucontext.h>
static void
static_func(void)
{
/* Use dladdr(3C) to print a call stack */
printstack(1);
/*
* Write to address 0, killing the process and
* producing a core file.
*/
*((char *) 0) = 1;
}
int main(int argc, char *argv[])
{
static_func();
return (0);
}
# cc -Wl,-znoldynsym test.c -o test_noldynsym
# cc test.c -o test_ldynsym
# elfdump -s test_ldynsym > test_ldynsym-nonstripped-elfdump-s.txt
# stript test_ldynsym
# elfdump -s test_ldynsym &>test_ldynsym-stripped-elfdump-s.txt
# elfdump -s test_noldynsym > test_noldynsym-nonstripped-elfdump-s.txt
# strip test_noldynsym
# elfdump -s test_noldynsym > test_noldynsym-stripped-elfdump-s.txt
Also, before stripping size of test_ldynsym is 10K, after - 72K(!)
[1] https://blogs.oracle.com/ali/entry/what_is_sunw_ldynsym
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug binutils/14493] New: "strip" breaks .SUNW_ldynsym section on illumos,
pashev.igor at gmail dot com <=
- [Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos, pashev.igor at gmail dot com, 2012/08/18
- [Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos, pashev.igor at gmail dot com, 2012/08/18
- [Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos, pashev.igor at gmail dot com, 2012/08/18
- [Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos, hjl.tools at gmail dot com, 2012/08/18
- [Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos, pashev.igor at gmail dot com, 2012/08/23
- [Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos, pashev.igor at gmail dot com, 2012/08/23
- [Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos, pashev.igor at gmail dot com, 2012/08/23
- [Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos, pashev.igor at gmail dot com, 2012/08/23
- [Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos, pashev.igor at gmail dot com, 2012/08/23
- [Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos, hjl.tools at gmail dot com, 2012/08/24