-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: crash in
postject_find_resource()
on Linux
The program headers base address values returned by `getauxval(AT_PHDR)` and `dl_iterate_phdr()` are identical only on `g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0`. However, the values are totally different on `clang version 10.0.0-4ubuntu1` and `g++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-16)`. Since the `dl_iterate_phdr()` approach seems to work for all the 3 compilers, I think we should proceed with that. Fixes: #70 Refs: #76 Signed-off-by: Darshan Sen <raisinten@gmail.com>
- Loading branch information
Showing
2 changed files
with
72 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#define _GNU_SOURCE | ||
|
||
#include <stdio.h> | ||
#include <string.h> | ||
|
||
|