Use label in assembly from C

前端 未结 2 1422
星月不相逢
星月不相逢 2020-12-31 06:13

I simply need a way to load the address of a label e.g. MyLabel: in e.g. \'src.asm\' into a variable in e.g. \'src.c\'. (These files will be linked together) I am using gcc

2条回答
  •  感情败类
    2020-12-31 06:44

    You might consider an assembler "getter" routine.

    Also, you might be able to simply fake the label to look like a routine to the C binder so that you could take the address of the "procedure".

提交回复
热议问题