File: test-define.c

package info (click to toggle)
fudgit 2.42-6
  • links: PTS
  • area: non-free
  • in suites: potato, woody
  • size: 2,468 kB
  • ctags: 2,375
  • sloc: ansic: 27,729; makefile: 793; yacc: 724; lex: 102; asm: 29; fortran: 15
file content (17 lines) | stat: -rw-r--r-- 252 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <dld.h>
#include <a.out.h>

test_define ()
{
	int *i;

	dld_link ("print_global.o");
	dld_define_sym ("global_int", sizeof(int));
	i = (int *) dld_get_symbol ("global_int");
	*i = 12345;
	printf ("print_global should now give 12345\n");
}