Last change
on this file since 453 was
444,
checked in by satin@…, 7 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
596 bytes
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | /* This object reserves enough space for an EH frame initialization |
---|
4 | object. */ |
---|
5 | |
---|
6 | struct object { |
---|
7 | void *reserve[7]; |
---|
8 | }; |
---|
9 | |
---|
10 | |
---|
11 | void _main () |
---|
12 | { |
---|
13 | static int initialized; |
---|
14 | static struct object object; |
---|
15 | if (! initialized) |
---|
16 | { |
---|
17 | typedef void (*pfunc) (); |
---|
18 | extern pfunc __ctors[]; |
---|
19 | extern pfunc __ctors_end[]; |
---|
20 | extern unsigned char __eh_frame_begin[]; |
---|
21 | extern void __register_frame_info (void *, struct object *); |
---|
22 | |
---|
23 | pfunc *p; |
---|
24 | |
---|
25 | initialized = 1; |
---|
26 | for (p = __ctors_end; p > __ctors; ) |
---|
27 | (*--p) (); |
---|
28 | |
---|
29 | __register_frame_info (__eh_frame_begin, &object); |
---|
30 | } |
---|
31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.