Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150432912
D21947.id63082.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21947.id63082.diff
View Options
Index: sys/arm64/include/elf.h
===================================================================
--- sys/arm64/include/elf.h
+++ sys/arm64/include/elf.h
@@ -64,7 +64,11 @@
__ElfType(Auxinfo);
+#ifdef _MACHINE_ELF_WANT_32BIT
+#define ELF_ARCH EM_ARM
+#else
#define ELF_ARCH EM_AARCH64
+#endif
#define ELF_MACHINE_OK(x) ((x) == (ELF_ARCH))
Index: usr.bin/gcore/Makefile
===================================================================
--- usr.bin/gcore/Makefile
+++ usr.bin/gcore/Makefile
@@ -5,7 +5,7 @@
SRCS= elfcore.c gcore.c
LIBADD= sbuf util
-.if ${MACHINE_ARCH} == "amd64"
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "aarch64"
SRCS+= elf32core.c
.endif
Index: usr.bin/gcore/elf32core.c
===================================================================
--- usr.bin/gcore/elf32core.c
+++ usr.bin/gcore/elf32core.c
@@ -32,7 +32,15 @@
rd->r_eflags = rs->r_rflags;
rd->r_esp = rs->r_rsp;
rd->r_ss = rs->r_ss;
-#else
+#elif defined(__aarch64__)
+ int i;
+
+ for (i = 0; i < 13; i++)
+ rd->r[i] = rs->x[i];
+ rd->r_sp = rs->x[13];
+ rd->r_lr = rs->x[14];
+ rd->r_pc = rs->elr;
+ rd->r_cpsr = rs->spsr;
#error Unsupported architecture
#endif
}
@@ -43,6 +51,8 @@
#ifdef __amd64__
/* XXX this is wrong... */
memcpy(rd, rs, sizeof(*rd));
+#elif defined(__aarch64__)
+ /* TODO */
#else
#error Unsupported architecture
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 2, 4:56 AM (42 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30703459
Default Alt Text
D21947.id63082.diff (1 KB)
Attached To
Mode
D21947: gcore: Add aarch64 32-bit core support
Attached
Detach File
Event Timeline
Log In to Comment