Skip to content

Commit 5a16d88

Browse files
committed
Skip writing if the requested OS ABI is the same as the current one
Signed-off-by: Dmitry Moskalchuk <[email protected]>
1 parent db2ad5e commit 5a16d88

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/patchelf.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,6 +1176,11 @@ void ElfFile<ElfFileParamNames>::modifyOsAbi(osAbiMode op, const std::string & n
11761176
else
11771177
error("unrecognized OS ABI");
11781178

1179+
if (newAbi == abi) {
1180+
debug("current and requested OS ABIs are equal\n");
1181+
return;
1182+
}
1183+
11791184
hdr()->e_ident[EI_OSABI] = newAbi;
11801185
changed = true;
11811186
}

0 commit comments

Comments
 (0)