WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Latest in magic cflags  (Read 2470 times)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Latest in magic cflags
« on: May 13, 2012, 11:32:07 AM »
http://lists.busybox.net/pipermail/busybox/2012-May/077816.html

On the busybox list it was pointed out that recent GCC includes a huge eh_frame section in binaries. Disabling this prevents debugging and pthread_cancel, but in a quick test cut 12% off a busybox build with our config.

So the magic is "-fno-asynchronous-unwind-tables". Adding it to the wiki, but announcing here too so everyone's aware ;)
The only barriers that can stop you are the ones you create yourself.

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: Latest in magic cflags
« Reply #1 on: May 13, 2012, 02:30:06 PM »
recent GCC means 4.7.0 version, isn't?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Latest in magic cflags
« Reply #2 on: May 14, 2012, 01:32:53 AM »
No, I got such a section even with gcc 4.2. Not sure exactly what's the version cutoff here.
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Latest in magic cflags
« Reply #3 on: May 14, 2012, 02:01:12 AM »
Just tried with tumbler, but got no any size rediction.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Latest in magic cflags
« Reply #4 on: May 14, 2012, 02:10:48 AM »
size -A /path/to/bin/tumbler | grep eh_frame

Before and after?
The only barriers that can stop you are the ones you create yourself.

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: Latest in magic cflags
« Reply #5 on: May 14, 2012, 02:37:01 AM »
No, I got such a section even with gcc 4.2. Not sure exactly what's the version cutoff here.

Since gcc 4.2? It does not seem possible....There must be a problem in busybox build system.

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: Latest in magic cflags
« Reply #6 on: May 14, 2012, 02:48:09 AM »
I tried busybox 1.20.0 with gcc 4.6.1 without -fno-asynchronous-unwind-tables
Code: [Select]
tc@box:~/busybox-1.20.0$ make defconfig
tc@box:~/busybox-1.20.0$ make
tc@box:~/busybox-1.20.0$ size -A busybox | grep eh_frame
.eh_frame_hdr        44   135260064
.eh_frame           200   135260108
tc@box:~/busybox-1.20.0$ size -A busybox_unstripped | grep eh_frame
.eh_frame_hdr        44   135260064
.eh_frame           200   135260108

I don't get a huge .eh_frame section here... Is it produced by some custom configuration?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Latest in magic cflags
« Reply #7 on: May 14, 2012, 03:03:45 AM »
That I don't know. Our busybox config is available under release/src, though.
The only barriers that can stop you are the ones you create yourself.

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: Latest in magic cflags
« Reply #8 on: May 14, 2012, 04:10:34 AM »
I can not reproduce with /release/src/busybox_1.19.4_030812.tgz

Applied patches and config and I get a normal .eh_frame section... any further step?
Even binary included in archive has normal .eh_frame size...