OS/2, eCS & ArcaOS - Technical > Programming

How to remove debugging information from the final exe file (gcc 9.2.0-5)

(1/1)

Igor:
I came across the fact that in the executable file a large amount of space is occupied by textual information of about this type:

--- Code: ---C:/usr/bin/../lib/gcc/i686-pc-os2-emx/9/../../../crt0.o
D:\Temp/ccLyDNo2.s
D:/Users/dmik/rpmbuild/BUILD/libc-0.1.10/src/emx/src/lib/startup/386/crt0.s
__crt0_fpucw
ForkModule
do_exit
atlas.o
__Z12FEnsureAtlasv.part.0
__ZL6rgcnca
__ZL6rgcnew
__ZZ6SzCityiE6szCity
__ZL6rgcnus
calc.o
__Z11FEnsureGridv.part.0
__Z15SwissEnsurePathv.part.0
__ZZ12FSwissPlanetidiPdS_S_S_S_S_E9nSwissEph
__ZL8rgObjJPL
_CSWTCH.427
__ZZ16SwissComputeStardP10_ExtraStarE5istar
__ZZ16SwissComputeStardP10_ExtraStarE7lonPrev
__ZZ16SwissComputeStardP10_ExtraStarE7latPrev
__ZZ20SwissComputeAsteroiddP10_ExtraStariE4iast
charts0.o
__ZZ6PrintSPKcE7ch2Prev
__ZZ6PrintSPKcE7ch3Prev
__ZZ6PrintSPKcE7ch4Prev
charts1.o
__Z13ChartEsotericv.part.0
__Z9ChartGridv.part.0
charts2.o
charts3.o
data.o
express.o
--- End code ---

What keys does the compiler need to set so that this information is not added to?
Now I use such a command file:

--- Code: ---gcc.exe -O2 -g0 -fcombine-stack-adjustments -fexpensive-optimizations -ffunction-cse -fgcse-las -finline-small-functions -march=i686 -Wno-write-strings -DNO_SWE_GLP -c *.cpp
gcc -Zexe -g0 -o myexe *.o
--- End code ---

Dave Yeo:
Remove the -g0 from the CFLAGS and LDFLAGS. You should also change the -Zexe to -Zomf.

Igor:

--- Quote from: Dave Yeo on May 03, 2023, 04:06:17 pm ---Remove the -g0 from the CFLAGS and LDFLAGS. You should also change the -Zexe to -Zomf.

--- End quote ---
Thanks!

Navigation

[0] Message Index

Go to full version