Skip to content

Commit 52135ea

Browse files
committed
elfexec: pass argv[0]
It is now supported.
1 parent 184b2b2 commit 52135ea

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/command.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2825,6 +2825,7 @@ static void perform_elfexec(const char *arg)
28252825
{
28262826
#if defined(DJ64) && !defined(DJ32) && defined(SIFLG_STATIC)
28272827
int rc;
2828+
char *argv[] = { NULL, NULL };
28282829
#endif
28292830
if (!arg || !arg[0])
28302831
{
@@ -2833,7 +2834,9 @@ static void perform_elfexec(const char *arg)
28332834
return;
28342835
}
28352836
#if defined(DJ64) && !defined(DJ32) && defined(SIFLG_STATIC)
2836-
rc = elfexec(arg, 0, NULL);
2837+
argv[0] = strdup(arg);
2838+
rc = elfexec(arg, 1, argv);
2839+
free(argv[0]);
28372840
if (rc == -1)
28382841
printf("elfexec failed%s\n", (_stubinfo->flags & SIFLG_STATIC) ?
28392842
" due to static linking" : "");

0 commit comments

Comments
 (0)