Skip to content

Commit d2f5926

Browse files
glibc: add changes to make riscv64-linux-gnu works
1 parent 5b803ae commit d2f5926

File tree

6 files changed

+10
-2
lines changed

6 files changed

+10
-2
lines changed

lib/libc/glibc/csu/elf-init-2.33.c

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<https://www.gnu.org/licenses/>. */
3535

3636
#include <stddef.h>
37+
#include <elf-initfini.h>
3738

3839

3940
/* These magic symbols are provided by the linker. */

lib/libc/glibc/include/gnu/stubs-lp64d.h

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#define NO_INITFINI 1

lib/libc/glibc/sysdeps/generic/sysdep.h

+6
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@
5656
# define cfi_personality(enc, exp) .cfi_personality enc, exp
5757
# define cfi_lsda(enc, exp) .cfi_lsda enc, exp
5858

59+
# ifndef __clang__
60+
# define cfi_label(label) .cfi_label label
61+
# else
62+
# define cfi_label(label)
63+
# endif
64+
5965
#else /* ! ASSEMBLER */
6066

6167
# define CFI_STRINGIFY(Name) CFI_STRINGIFY2 (Name)

lib/libc/glibc/sysdeps/riscv/start-2.33.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
ENTRY (ENTRY_POINT)
4646
/* Terminate call stack by noting ra is undefined. Use a dummy
4747
.cfi_label to force starting the FDE. */
48-
.cfi_label .Ldummy
48+
cfi_label (.Ldummy)
4949
cfi_undefined (ra)
5050
call load_gp
5151
mv a5, a0 /* rtld_fini. */

lib/libc/glibc/sysdeps/riscv/start.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
ENTRY (ENTRY_POINT)
4646
/* Terminate call stack by noting ra is undefined. Use a dummy
4747
.cfi_label to force starting the FDE. */
48-
.cfi_label .Ldummy
48+
cfi_label (.Ldummy)
4949
cfi_undefined (ra)
5050
call load_gp
5151
mv a5, a0 /* rtld_fini. */

0 commit comments

Comments
 (0)