Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107284060
D25651.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
D25651.diff
View Options
Index: head/sys/powerpc/powerpc/elf_common.c
===================================================================
--- head/sys/powerpc/powerpc/elf_common.c
+++ head/sys/powerpc/powerpc/elf_common.c
@@ -36,7 +36,22 @@
Elf_Auxinfo *argarray, *pos;
int error;
- if (imgp->proc->p_osrel >= P_OSREL_POWERPC_NEW_AUX_ARGS)
+ /*
+ * XXX If we can't find image's OSREL, assume it uses the new auxv
+ * format.
+ *
+ * This is specially important for rtld, that is not tagged. Using
+ * direct exec mode with new (ELFv2) binaries that expect the new auxv
+ * format would result in crashes otherwise.
+ *
+ * Unfortunately, this may break direct exec'ing old binaries,
+ * but it seems better to correctly support new binaries by default,
+ * considering the transition to ELFv2 happened quite some time
+ * ago. If needed, a sysctl may be added to allow old auxv format to
+ * be used when OSREL is not found.
+ */
+ if (imgp->proc->p_osrel >= P_OSREL_POWERPC_NEW_AUX_ARGS ||
+ imgp->proc->p_osrel == 0)
return (__elfN(freebsd_copyout_auxargs)(imgp, base));
args = (Elf_Auxargs *)imgp->auxargs;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 11:24 PM (21 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15773727
Default Alt Text
D25651.diff (1 KB)
Attached To
Mode
D25651: [PPC] Make new auxv format default
Attached
Detach File
Event Timeline
Log In to Comment