fune/build/unix/elfhack/relrhack.h
Mike Hommey 90c8c29f23 Bug 1839740 - New relrhack tool, a modern replacement to elfhack. r=firefox-build-system-reviewers,sergesanspaille
Elfhack is the main reason we're not using lld on Linux/Android
shippable builds, because the way it works doesn't go well with how lld
lays out ELF binaries. By leveraging the linker itself (BFD and lld both
having recently gained the ability to generate the compact relocation
info themselves), we can achieve a similar result to what elfhack is
doing, while allowing to use lld.

See more in-depth background on https://glandium.org/blog/?p=4297

Differential Revision: https://phabricator.services.mozilla.com/D187089
2023-09-16 19:52:25 +00:00

25 lines
523 B
C

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef __RELRHACK_H__
#define __RELRHACK_H__
#include <elf.h>
#define DT_RELRHACK_BIT 0x8000000
#ifndef DT_RELRSZ
# define DT_RELRSZ 35
#endif
#ifndef DT_RELR
# define DT_RELR 36
#endif
#ifndef DT_RELRENT
# define DT_RELRENT 37
#endif
#ifndef SHR_RELR
# define SHT_RELR 19
#endif
#endif /* __RELRHACK_H__ */