Displaying 1 result from an estimated 1 matches for "get_unit_id".
2013 Oct 16
1
[LLVMdev] Unexpected behaviour of the LLVM gold plugin with --allow-multiple-definition
...pected
behaviour when the option --allow-multiple-definition (or -z muldefs) is
specified for the linker.
Let's suppose the following scenario with four simple source files:
----- main.c ------
#include "unit.h"
int main() {
only_in_unit1();
only_in_unit2();
return get_unit_id();
}
----- unit.h ------
#ifndef _UNIT
#define _UNIT 1
int get_unit_id( void );
void only_in_unit1( void );
void only_in_unit2( void );
#endif
----- unit1.c ------
#include "unit.h"
int get_unit_id( void ) {
return 1;
}
void only_in_unit1( void ) {}
----- unit2.c ------
#in...