W dniu 18.12.2012 13:03, Sven Eden pisze: > Am Dienstag, 18. Dezember 2012, 12:43:55 schrieb Marcin Mirosław: >> W dniu 18.12.2012 12:13, Sven Eden pisze: > > (snip, because this has nothing to do with the previous discussion.) > >>>> On my 32-bit machines I have... >>>> >>>> FLAGS="-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe >>>> -fno-unwind-tables -fno-asynchronous-unwind-tables" CXXFLAGS="${CFLAGS}" >>>> >>>> See http://comments.gmane.org/gmane.linux.busybox/36695 for why I >>>> >>>> include "-fno-unwind-tables -fno-asynchronous-unwind-tables". Would I >>>> have to rebuild system and world without... >>>> >>>> -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables >>>> >>>> ...to have debug data available? >>> >>> No, you haven't, if you have compiled everything with "-g" or "-ggdb". >>> >>> According to the web page you linked, the DWARF-2 tables are then written >>> into the .debug files. Without -g/-ggdb, they are stripped and no longer >>> available for debugging. >>> >>> So according to your CFLAGS, you'd have to rebuild everything, yes, but a >>> simple "-g" would do. >>> >>> Oh, and "splitdebug" in "FEATURES" would be a good idea, too! ;) >> >> Hi Sven! >> Meseems you are not right, please look at it: >> $ readelf -p .GCC.command.line /usr/lib64/debug/usr/bin/sqlite3.debug >> >> |grep "unwind\|-g" >> >> [ 1e2] -grecord-gcc-switches >> [ 1f8] -ggdb >> [ 202] -frecord-gcc-switches >> $ size /usr/bin/sqlite3 >> text data bss dec hex filename >> 44545 4124 328 48997 bf65 /usr/bin/sqlite3 >> >> >> And with -fno-unwind... >> $ readelf -p .GCC.command.line /usr/lib64/debug/usr/bin/sqlite3.debug >> >> |grep "unwind\|-g" >> >> [ 1e2] -grecord-gcc-switches >> [ 1f8] -ggdb >> [ 202] -frecord-gcc-switches >> [ 218] -fno-unwind-tables >> [ 22b] -fno-asynchronous-unwind-tables >> $ size /usr/bin/sqlite3 >> text data bss dec hex filename >> 42713 4124 328 47165 b83d /usr/bin/sqlite3 >> >> As you can see I have splitdebug turned on. >> Marcin > > Hi Marcin,
Hi Sven! > I am not right with what? All I did was interpreting a quoted link. And what > is this supposed to mean? So /usr/bin/sqlite3 looses size. Yes. This goes > along with the quoted link. But did you compare the current size of > /usr/lib64/debug/usr/bin/sqlite3.debug before and after? My fault, I didn't respond below correct paragraph. I was thinking about: >>> According to the web page you linked, the DWARF-2 tables are then written >>> into >>> the .debug files. Without -g/-ggdb, they are stripped and no longer >>> available >>> for debugging. I tried to show that without "-g/-ggdb" gcc generates DWARF-2 tables and strip doesn't remove it from binaries. I pasted examples with sqlite3 compiles with "-ggdb" but I'm getting the same results without debug flags. When I add -fno-unwind-tables and -fno-asynchronous-unwind-tables I'm getting smaller size of "text" (and all binary also). And I agree with all you write about recompiling system with "-g" and splitdebug. Hmm, now I think you was thinking only about adding debug information to Walters' gentoo and didn't want to talk about growing eh_frame... > Sorry for any inconvenience, but I assure you, I have absolutly no idea what > you intent to show. I hope I throwed some light on my earlier answer. regards, Marcin