On Sun, Jun 02, 2013 at 06:14:09AM +0000, wx wrote:
hi,kevin there is patch from 0.6.1 to 0.6.2 f3fe3aa7a0ccb881e659a4281d6f0a0bb5c33cc5 (Require a "_cfuncXX_" symbol prefix for inter-mode c function references.)
how _cfunc32flat_, _cfunc32seg_ prefix are added to C function symbols ? It seems that macro "VISIBLE32FLAT" or "VISIBLE32SEG" can not do this or which gcc attributes influence it ? post.c void VISIBLE32FLAT _start(void) { romleyout.S _cfunc32flat__start
The build scripts do this - see keepsymbol() in tools/layoutrom.py. Basically, the 32bit code isn't linked direclty with the 16bit code. Instead, three separate binaries are created (32bit "flat", 32bit "segmented", and 16bit). The build scripts then manipulate the references between these separate binaries. The scripts require C function references between the binaries to have a prefix, and it will strip the prefix off when resolving them.
-Kevin