--- ./libbacktrace/fileline.c_orig	2022-09-09 23:20:23 +0000
+++ ./libbacktrace/fileline.c	2022-09-09 23:31:54 +0000
@@ -205,15 +205,15 @@ fileline_initialize (struct backtrace_st
 	  filename = getexecname ();
 	  break;
 	case 2:
-	  filename = "/proc/self/exe";
+	  snprintf (buf, sizeof (buf), "/proc/%ld/object/a.out",
+						   (long) getpid ());
+	  filename = buf;
 	  break;
 	case 3:
 	  filename = "/proc/curproc/file";
 	  break;
 	case 4:
-	  snprintf (buf, sizeof (buf), "/proc/%ld/object/a.out",
-		    (long) getpid ());
-	  filename = buf;
+	  filename = "/proc/self/exe";
 	  break;
 	case 5:
 	  filename = sysctl_exec_name1 (state, error_callback, data);
