Skip to content

Commit

Permalink
glibc: add changes to make riscv64-linux-gnu works
Browse files Browse the repository at this point in the history
  • Loading branch information
RossComputerGuy committed Feb 4, 2024
1 parent 5b803ae commit f3d9547
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/libc/glibc/csu/elf-init-2.33.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<https://www.gnu.org/licenses/>. */

#include <stddef.h>
#include <elf-initfini.h>


/* These magic symbols are provided by the linker. */
Expand Down
1 change: 1 addition & 0 deletions lib/libc/glibc/sysdeps/generic/elf-initfini.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define NO_INITFINI 1
6 changes: 6 additions & 0 deletions lib/libc/glibc/sysdeps/generic/sysdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
# define cfi_personality(enc, exp) .cfi_personality enc, exp
# define cfi_lsda(enc, exp) .cfi_lsda enc, exp

# ifndef __clang__
# define cfi_label(label) .cfi_label label
# else
# define cfi_label(label)
# endif

#else /* ! ASSEMBLER */

# define CFI_STRINGIFY(Name) CFI_STRINGIFY2 (Name)
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/sysdeps/riscv/start-2.33.S
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
ENTRY (ENTRY_POINT)
/* Terminate call stack by noting ra is undefined. Use a dummy
.cfi_label to force starting the FDE. */
.cfi_label .Ldummy
cfi_label (.Ldummy)
cfi_undefined (ra)
call load_gp
mv a5, a0 /* rtld_fini. */
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/glibc/sysdeps/riscv/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
ENTRY (ENTRY_POINT)
/* Terminate call stack by noting ra is undefined. Use a dummy
.cfi_label to force starting the FDE. */
.cfi_label .Ldummy
cfi_label (.Ldummy)
cfi_undefined (ra)
call load_gp
mv a5, a0 /* rtld_fini. */
Expand Down
Empty file.

0 comments on commit f3d9547

Please sign in to comment.