Home > OS >  GCC compiler C program, would generate a lot of similar. Data. _ZNSt17_xxxxxxx period, why?
GCC compiler C program, would generate a lot of similar. Data. _ZNSt17_xxxxxxx period, why?

Time:11-23

Gcc4.8.1 cross compiling c + + program, the generated PowerPC file, there will be much more special. Data. _ZNSt17_timepunct_cacheIcE12_S_timezonesE section, there are similar. BSS. _ZZN9_gnu_cxx27_verbose_terminate_handlerEvE11terminating section,

Using gcc3.4.4 compiled program, the only one. The data segments or. BSS, not a lot to. Data beginning or. BSS the beginning of the paragraph,

Now find the problem is connected in the script using only *. BSS, will lose other BSS, must use *. BSS. *,

Excuse me each expert:
1) what is the difference between gcc4.8.1 and gcc3.4.4 in generating period?
2) connect the script if only use *. Text, will lose some text information? Whether connection script must use *. Text. *?

CodePudding user response:

Do not have what difference, plus - ffunction - sections of options - fdata - sections will give each function individually named text, data, fine control of BSS, convenient links script...

CodePudding user response:

reference 1st floor mLee79 response:
do not have what difference, plus - ffunction - sections of options - fdata - sections will give each function individually named text, data, fine control of BSS, convenient links script...


GCC4.8.1 compiled C program does not have this kind of phenomenon, did not add these two options now, when compiling C + + will generate a lot of independent, even has a lot of BSS, this is related to C + +?

The question now is, usually with a connection to the script generally use *. Text, *. Data, *. BSS, rather than using *. Text. *. *.. * *. BSS. *, so will lose a lot of information?
  • Related