yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame^] | 1 | .file "initfini.c" |
| 2 | |
| 3 | #include <bits/arm_asm.h> |
| 4 | .section .init |
| 5 | .global _init |
| 6 | .type _init, %function |
| 7 | #if defined __thumb__ |
| 8 | .align 1 |
| 9 | .thumb |
| 10 | @ this will not work on ARMv4T, but lots of stuff |
| 11 | @ in here won't work there anyway... |
| 12 | pop {r4-r7, pc} |
| 13 | #else |
| 14 | .align 2 |
| 15 | .arm |
| 16 | ldmdb fp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, pc} |
| 17 | #endif |
| 18 | |
| 19 | .section .fini |
| 20 | .global _fini |
| 21 | .type _fini, %function |
| 22 | #if defined __thumb__ |
| 23 | .align 1 |
| 24 | .thumb |
| 25 | pop {r4-r7, pc} |
| 26 | #else |
| 27 | .align 2 |
| 28 | .arm |
| 29 | ldmdb fp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, pc} |
| 30 | #endif |
| 31 | |
| 32 | @ In fact this is modified to 3.4.4 |
| 33 | .ident "GCC: (GNU) 3.3.2 20031005 (Debian prerelease)" |