diff options
| author | Andrew Turner <andrew@FreeBSD.org> | 2018-11-07 09:49:25 +0000 |
|---|---|---|
| committer | Andrew Turner <andrew@FreeBSD.org> | 2018-11-07 09:49:25 +0000 |
| commit | a0e4ca397e73c063d3f0d529832e29c01bf7600b (patch) | |
| tree | 35d20e03e66c2f91fe2440f642b50afeeab38ae0 /lib/csu | |
| parent | 36d2d637dd0ad3227083b5ebd9e38c17c6c934a1 (diff) | |
Notes
Diffstat (limited to 'lib/csu')
| -rw-r--r-- | lib/csu/mips/crt.h | 20 | ||||
| -rw-r--r-- | lib/csu/sparc64/crt.h | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/csu/mips/crt.h b/lib/csu/mips/crt.h index 509899b97b96d..7da894280f53f 100644 --- a/lib/csu/mips/crt.h +++ b/lib/csu/mips/crt.h @@ -27,5 +27,25 @@ #define _CRT_H_ #define HAVE_CTORS +#define CTORS_CONSTRUCTORS +#ifdef __mips_o32 +#define INIT_CALL_SEQ(func) \ + ".set noreorder \n" \ + "bal 1f \n" \ + "nop \n" \ + "1: \n" \ + ".cpload $ra \n" \ + ".set reorder \n" \ + "jal " __STRING(func) +#else +#define INIT_CALL_SEQ(func) \ + ".set noreorder \n" \ + "bal 1f \n" \ + "nop \n" \ + "1: \n" \ + ".set reorder \n" \ + ".cpsetup $ra, $v0, 1b \n" \ + "jal " __STRING(func) +#endif #endif diff --git a/lib/csu/sparc64/crt.h b/lib/csu/sparc64/crt.h index 509899b97b96d..82984849630de 100644 --- a/lib/csu/sparc64/crt.h +++ b/lib/csu/sparc64/crt.h @@ -27,5 +27,7 @@ #define _CRT_H_ #define HAVE_CTORS +#define CTORS_CONSTRUCTORS +#define INIT_CALL_SEQ(func) "call " __STRING(func) "; nop" #endif |
