Skip to content

Commit acb7581

Browse files
authored
allow ELF link audit version <= LAV_CURRENT (#173)
## Purpose Check the link audit version the ELF debug header is not greater than the current version, `LAV_CURRENT` rather than exactly equal to it. ## Background On a recent Linux host, `LAV_CURRENT` is defined as 2, while modules may be 1 or 2. Changing the check this way allows both v1 and v2 modules to load, which is safe since the header layouts did not between versions. ## Validation Manually ran `image list` from lldb when attached to a `remote-linux` ds2 server (on Fedora 40) and verified the list of modules matches the list generated when doing the same against an lldb-server instance.
1 parent c5f2b79 commit acb7581

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Target/POSIX/ELFProcess.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ EnumerateLinkMap(ELFProcess *process, Address addressToDPtr,
191191
// Android and FreeBSD don't have a definition for LAV_CURRENT so we skip this
192192
// check.
193193
#if defined(LAV_CURRENT)
194-
if (debug.version != LAV_CURRENT) {
194+
if (debug.version > LAV_CURRENT) {
195195
return kErrorUnsupported;
196196
}
197197
#endif

0 commit comments

Comments
 (0)