runtime_loader: fixes the 64-bit build.
1/ error: no matching function for call to 'min(long unsigned int, uint32&)'. 2/ error: comparison between signed and unsigned integer expressions.
This commit is contained in:
@@ -494,7 +494,8 @@ determine_x86_abi(int fd, const Elf32_Ehdr& elfHeader, bool& _isGcc2)
|
|||||||
if (symbolHash == NULL || symbolTable == NULL || stringTable == NULL)
|
if (symbolHash == NULL || symbolTable == NULL || stringTable == NULL)
|
||||||
return false;
|
return false;
|
||||||
uint32 symbolCount
|
uint32 symbolCount
|
||||||
= std::min(symbolTableSize / sizeof(Elf32_Sym), symbolHashChainSize);
|
= std::min(symbolTableSize / (uint32)sizeof(Elf32_Sym),
|
||||||
|
symbolHashChainSize);
|
||||||
if (symbolCount < symbolHashSize)
|
if (symbolCount < symbolHashSize)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -520,7 +521,7 @@ determine_x86_abi(int fd, const Elf32_Ehdr& elfHeader, bool& _isGcc2)
|
|||||||
<= sectionHeader->sh_addr + sectionHeader->sh_size) {
|
<= sectionHeader->sh_addr + sectionHeader->sh_size) {
|
||||||
off_t fileOffset = symbol->st_value - sectionHeader->sh_addr
|
off_t fileOffset = symbol->st_value - sectionHeader->sh_addr
|
||||||
+ sectionHeader->sh_offset;
|
+ sectionHeader->sh_offset;
|
||||||
if (fileOffset + sizeof(uint32) <= st.st_size) {
|
if (fileOffset + (off_t)sizeof(uint32) <= st.st_size) {
|
||||||
uint32 abi
|
uint32 abi
|
||||||
= *(uint32*)((uint8*)fileBaseAddress + fileOffset);
|
= *(uint32*)((uint8*)fileBaseAddress + fileOffset);
|
||||||
_isGcc2 = (abi & B_HAIKU_ABI_MAJOR)
|
_isGcc2 = (abi & B_HAIKU_ABI_MAJOR)
|
||||||
|
|||||||
Reference in New Issue
Block a user