mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 02:06:37 +00:00
rtld-elf: add some debug print statements
The byte-order independent code has been reported to fail on powerpc64. Add some more debug statements to help identify the parametrs used and to verify the correct operation of the byte-swap macros used..
This commit is contained in:
parent
36de8bb226
commit
173953182a
|
@ -2109,6 +2109,11 @@ gethints(bool nostdlib)
|
|||
return (NULL);
|
||||
}
|
||||
is_le = /*le32toh(1) == 1 || */ hdr.magic == ELFHINTS_MAGIC;
|
||||
dbg("host byte-order: %s-endian", le32toh(1) == 1 ? "little" : "big");
|
||||
dbg("hints file byte-order: %s-endian", is_le ? "little" : "big");
|
||||
dbg("verify swap macros: le32toh(0x12345678) == %#010x, "
|
||||
"be32toh(0x12345678) == %#010x",
|
||||
le32toh(0x12345678), be32toh(0x12345678));
|
||||
magic = COND_SWAP(hdr.magic);
|
||||
version = COND_SWAP(hdr.version);
|
||||
strtab = COND_SWAP(hdr.strtab);
|
||||
|
|
Loading…
Reference in a new issue