rtld: add support for -z initfirst
(cherry picked from commit 78aaab9f1cf359f3b7325e4369653f6b50593393)