vndk-def: Add --check-dt-needed-ordering

This commit adds `--check-dt-needed-ordering`, which will check the
ordering of DT_NEEDED entries.  `libc.so` must be prior to `libdl.so`;
otherwise, `libdl.so` won't be able to link with `__cxa_finalize()` when
`libc.so` and `libdl.so` are not loaded into the default linker
namespace.

This check is enabled by default.  To disable this check, pass
`--no-check-dt-needed-ordering` to the command line options.

Bug: 74090470
Test: Run vndk_definition_tool.py check-dep on sailfish.
Change-Id: If33c1b6578e6fe70ddab44e4f3f2aaad23cd91b8
1 file changed