Remix.run Logo
10000truths 12 hours ago

Debug symbol size shouldn't be influencing relocation jump distances - debug info has its own ELF section.

Regardless of whether you're FAANG or not, nothing you're running should require an executable with a 2 GB large .text section. If you're bumping into that limit, then your build process likely lacks dead code elimination in the linking step. You should be using LTO for release builds. Even the traditional solution (compile your object files with -ffunction-sections and link with --gc-sections) does a good job of culling dead code at function-level granularity.

saagarjha 11 hours ago | parent | next [-]

Google Chrome ships as a 500 MB binary on my machine, so if you're embedding a web browser, that's how much you need minimum. Now tack on whatever else your application needs and it's easy to see how you can go past 2 GB if you're not careful. (To be clear, I am not making a moral judgment here, I am just saying it's possible to do. Whether it should happen is a different question.)

throwawaymobule 9 hours ago | parent [-]

Do you have some special setup?

Chromium is in the hundred and something MB range on mine last I looked. Might expand to more on install.

2 hours ago | parent | next [-]
[deleted]
saagarjha 9 hours ago | parent | prev [-]

I just checked Google Chrome Framework on my Mac, it was a little over 400 MB. Although now that I think about it it's probably a universal binary so you can cut that in half?

trevor-e 6 hours ago | parent [-]

Yea looks like Chrome ships a universal binary with both x86_64 and arm64.

sznio an hour ago | parent [-]

makes sense, chromium on my Fedora system takes up 234MB.

yablak 11 hours ago | parent | prev [-]

FAANGs we're deeply involved in designing LTO. See, e.g.,

https://research.google/pubs/thinlto-scalable-and-incrementa...

And other refs.

And yet...

jeffbee 9 hours ago | parent [-]

Google also uses identical code folding. It's a pretty silly idea that a shop that big doesn't know about the compiler flags.

Orphis 4 hours ago | parent [-]

Google is made of many thousands of individuals. Some experts will be aware of all those, some won't. In my team, many didn't know about those details as they were handled by other builds teams for specific products or entire domains at once.

But since each product in some different domains had to actively enable those optimizations for themselves, they were occasionally forgotten, and I found a few in the app I worked for (but not directly on).

jeffbee 4 hours ago | parent [-]

ICF seems like a good one to keep in the box of flags people don't know about because like everything in life it's a tradeoff and keeping that one problematic artifact under 2GiB is pretty much the only non-debatable use case for it.