https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93751
--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > But it turned out that we cannot go to -g1, exactly because we need the > ability to find the addresses/locations of all exported objects - both > functions and data. Do you really need debug information for this? > First, I am not sure that fixing a manual is a good idea: that would require > removing generation of such debug info for older formats to align with > current DWARF behavior ("-g1 makes GCC generate debug info only for > functions"), which is much likelier to break existing users which depend on > it. All the other formats are effectively deprecated at this point I think. > Also I think most typical executables have fewer exported data objects than > they do have functions (note that for functions, DIEs are generated even for > static ones, so the increase in size of the debugging info should be fairly > negligible. Users concerned about even such minor increases typically strip > the debug information from the binaries altogether. People use -g1 precisely because they cannot strip all the debug information, otherwise they would just use -g0. And they don't use -g2 because it's bloated so we must be careful not to do the same for -g1. To sum up, I think that we would need some figures before changing a behavior that has been there for 25 years.