diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-11-07 18:54:24 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-11-07 18:54:24 +0000 |
| commit | 8c1538224adf39b7486c5f4d0c0f18317f60f157 (patch) | |
| tree | 946ec5c003c5497a448f35425a2277658efb9f08 /lib | |
| parent | c06e7b66a147edf55f4241fbfbfa32856550cd15 (diff) | |
| parent | 4bf4b0f139972cb5caa6b523221b42c81879af5a (diff) | |
Notes
Diffstat (limited to 'lib')
| -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 509899b97b96..7da894280f53 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 509899b97b96..82984849630d 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 |
