Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-21 Thread Alexander Kabaev
On Fri, 21 Oct 2011 00:54:32 -0700 Garrett Cooper wrote: > On Fri, Oct 21, 2011 at 12:51 AM, Wojciech Puchar > wrote: > >> on entry into each function, which is different from usual x86 > >> convention. > >> Asynchronous unwind info (yeah, same stuff you keep referring to as > >> crap), is the o

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-21 Thread Wojciech Puchar
that i do not want to debug isn't it? It seems like a binutils bug (or somewhere in that immediate neighborhood) because all debugging related sections should be stripped out by strip including unwind, correct? indeed. ___ freebsd-hackers@freebsd.org

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-21 Thread Garrett Cooper
On Fri, Oct 21, 2011 at 12:51 AM, Wojciech Puchar wrote: >> on entry into each function, which is different from usual x86 >> convention. >> Asynchronous unwind info (yeah, same stuff you keep referring to as >> crap), is the only way you can debug your program or get anything >> remotely close to

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-21 Thread Wojciech Puchar
on entry into each function, which is different from usual x86 convention. Asynchronous unwind info (yeah, same stuff you keep referring to as crap), is the only way you can debug your program or get anything remotely close to usable backtrace, by default. i understand but i DO NOT called compil

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Alexander Kabaev
On Fri, 21 Oct 2011 00:20:52 +0200 (CEST) Wojciech Puchar wrote: > >> i both don't use C++ and don't want to debug when i am linking > >> final binary. > >> > >> how to turn this off? > > > > Which compiler do you use? > > supplied with FreeBSD 8.2 > [wojtek@wojtek ~]$ cc -v > Using built-in spe

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Alexander Kabaev
On Fri, 21 Oct 2011 01:13:59 +0200 (CEST) Wojciech Puchar wrote: > > > > -fno-asynchronous-unwind-tables should get rid of unwind > > information, a.k.a. 'crap'. > and this worked. found it just before getting your mail ;) > > yes and this is crap... possibly it is needed for some cases and some

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Wojciech Puchar
-fno-asynchronous-unwind-tables should get rid of unwind information, a.k.a. 'crap'. and this worked. found it just before getting your mail ;) yes and this is crap... possibly it is needed for some cases and some languages and i would not call it crap if it would not be included by default!

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Wojciech Puchar
--remove-section .rel.eh_frame --remove-section .rela.eh_frame $your_executable After I done this, the binary size *increased* a lot, while objdump shows that the content is less. I don't understand. add -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables w

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Wojciech Puchar
After I done this, the binary size *increased* a lot, while objdump shows that the content is less. I don't understand. same for me strip -R .eh_frame -R .eh_frame_hdr do the same. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.o

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Wojciech Puchar
this do the same that strip -R what i already tried and as i already wrote - the same results. program is working and sections are stripped but i am getting ca 1MB of binary zero paddings. ___ freebsd-hackers@freebsd.org mailing list http://list

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Wojciech Puchar
i both don't use C++ and don't want to debug when i am linking final binary. how to turn this off? Which compiler do you use? supplied with FreeBSD 8.2 [wojtek@wojtek ~]$ cc -v Using built-in specs. Target: amd64-undermydesk-freebsd Configured with: FreeBSD/amd64 system compiler Thread model:

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Zhihao Yuan
On Thu, Oct 20, 2011 at 7:13 AM, Dimitry Andric wrote: > On 2011-10-20 12:44, Wojciech Puchar wrote: > >> i both don't use C++ and don't want to debug when i am linking final >> binary. >> >> how to turn this off? >> > > objcopy --remove-section .eh_frame_hdr --remove-section .eh_frame > --remove

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Dimitry Andric
On 2011-10-20 12:44, Wojciech Puchar wrote: i both don't use C++ and don't want to debug when i am linking final binary. how to turn this off? objcopy --remove-section .eh_frame_hdr --remove-section .eh_frame --remove-section .rel.eh_frame --remove-section .rela.eh_frame $your_executable No

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Andriy Gapon
on 20/10/2011 13:44 Wojciech Puchar said the following: > i both don't use C++ and don't want to debug when i am linking final binary. > > how to turn this off? Which compiler do you use? -- Andriy Gapon ___ freebsd-hackers@freebsd.org mailing list ht

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Wojciech Puchar
i both don't use C++ and don't want to debug when i am linking final binary. how to turn this off? On Thu, 20 Oct 2011, Joerg Sonnenberger wrote: On Thu, Oct 20, 2011 at 09:41:24AM +0200, Wojciech Puchar wrote: how to do this and what the hell it is used at all? It is used to allow unwindi

Re: .eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Joerg Sonnenberger
On Thu, Oct 20, 2011 at 09:41:24AM +0200, Wojciech Puchar wrote: > how to do this and what the hell it is used at all? It is used to allow unwinding stack frames. That is required for exception handling with C++ and also to allow debugging in the presence of -fomit-frame-pointer, e.g. as used by d

.eh_frame, .eh_frame_hdr - how to remove that trash

2011-10-20 Thread Wojciech Puchar
how to do this and what the hell it is used at all? i found somewhere it is some debugging info but i do not put -g option to compiler while compiling and still get substantial amount of this trash. trying strip -R .eh_frame -R .eh_frame_hdr results in working but LARGER binary, padded with lo