mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-02 19:07:34 +00:00
fixups
This commit is contained in:
@@ -30,6 +30,7 @@ Tools for Eden and other subprojects. When adding new scripts please use `#!/bin
|
||||
- `find-unused-strings.sh`: Find any unused strings in the Android app (XML -> Kotlin).
|
||||
- `cpp-lint.sh`: Homemade dumb C++ linter.
|
||||
- `fuzzsettings.cpp`: Fuzz settings files.
|
||||
- `sysvpatch.c`: Patches ELF files so their OS/ABI is SYSV (managarm workaround).
|
||||
|
||||
## Android
|
||||
It's recommended to run these scritps after almost any Android change, as they are relatively fast and important both for APK bloat and CI.
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
int main(int argc, char *argv[]) {
|
||||
char s[BUFSIZ];
|
||||
snprintf(s, sizeof s, "strip %s", argv[1]);
|
||||
system(s);
|
||||
struct stat st;
|
||||
int fd = open(argv[1], O_RDONLY);
|
||||
if (fd) {
|
||||
fstat(fd, &st);
|
||||
char *buf = malloc(st.st_size);
|
||||
write(fd, buf, st.st_size);
|
||||
close(fd);
|
||||
/* set elf type to 0 = SYSV */
|
||||
buf[7] = 0;
|
||||
write(fileno(stdout), buf, st.st_size);
|
||||
free(buf);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
Reference in New Issue
Block a user