A comment to the changes in review D44053 suggested to add specific debug messages for the causes of a failure to load the hints file.
Since these extended debug messages are independent of the the proposed changes in D44053, they have been extracted from that review.
Debug messages are enabled at run time by setting LD_DEBUG to a non-empty string (unless rtld-elf has been compiled with -D NO_LD_DEBUG).
Details
- Reviewers
kib
Verify that ld-elf.so.1 can be built with this patch applied and that it is functional.
It is possible to trigger each of the messages by removal, truncation, or modification of the hints file.
Check that the messages correspond to the respective error situations and assess whether each particular message is useful.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
libexec/rtld-elf/rtld.c | ||
---|---|---|
2102 | You could use %#08x, as format specifier, then it is obvious for reader that magic numbers are hex. |
Building in the source directory had worked, but some type casts are required to make some dbg() calls compile during make world.
Please upload the full context for the diff (git diff -U99999999 ...)
libexec/rtld-elf/rtld.c | ||
---|---|---|
2135 | this is usually and better handled with "%jx" and cast to uintmax_t |
libexec/rtld-elf/rtld.c | ||
---|---|---|
2111 | This should probably say "... list is too long: ..." as opposed to "list to long" |
This patch has been accepted as part of review D44053 and has been committed with modified variable names as part of commit 7b77d37a561b4.