hi all, i have three puzzles about the macro "hidden_def" and "hidden_proto" in "libsepol/src/dso.h". i copy the definitions of these two macros into a separate header file to test these two macros, and assembly them: $ cat hidden_def.h int extern_i=12345; #define hidden __attribute__ ((visibility("hidden"))) #define hidden_proto(fct) __hidden_proto (fct, fct##_internal) #define __hidden_proto(fct, internal) \ extern __typeof(fct) internal; \ extern __typeof(fct) fct __asm (#internal) hidden; #define hidden_def(fct) \ asm (".globl " #fct "\n.set " #fct ", " #fct "_internal"); $ cat hidden_def.c #include "hidden_def.h" int main() { hidden_proto(extern_i); } $ gcc -S hidden_def.c -o hidden_proto.s hidden_def.c: In function ¡®main¡¯: hidden_def.c:17: warning: asm declaration ignored due to conflict with previous rename as a result, there aren't #APP(#NO_APP) section in ".s" file Questions: (1) i don't know why i got these assembly warning? (2) i find in the gas manual: .set SYMBOL, EXPRESSION if SYMBOL are flagged as external, it remains flagged how can "fct" be hidden, because it has been declared as globl. (3) what is the difference between hidden_def and gcc hidden visibility attribute? why libsepol use both of them? i know these problems are not selinux-specific, but i have googled for a long time, i don't know where i can get guides about these kinds of problems. can anyone give me some hints? -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message.