diff options
| author | Jose E. Marchesi <[email protected]> | 2015-10-05 17:36:33 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2015-10-06 00:03:07 +0200 |
| commit | 22843755fa0b6870162660105c6fbbd1ba078390 (patch) | |
| tree | fb119639af804f29016c9548201d0799596afce5 /backends/sparc_init.c | |
| parent | ee00afbb2b068d1fef7f37e32ddd346b78230d5a (diff) | |
sparc: fix the extraction of relocation IDs from r_type fields.
This patch adds support for a RELOC_TYPE_ID transform macros that
backends can use before including common-reloc.c. The sparc backend
uses this in order to extract the relocation IDs from r_type fields.
In this target the most significative 24 bits of r_type are used to
store an additional addend in some relocation types.
Signed-off-by: Jose E. Marchesi <[email protected]>
Diffstat (limited to 'backends/sparc_init.c')
| -rw-r--r-- | backends/sparc_init.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/sparc_init.c b/backends/sparc_init.c index 18d73494..229a9b08 100644 --- a/backends/sparc_init.c +++ b/backends/sparc_init.c @@ -34,6 +34,11 @@ #define RELOC_PREFIX R_SPARC_ #include "libebl_CPU.h" +/* In SPARC some relocations use the most significative 24 bits of the + r_type field to encode a secondary addend. Make sure the routines + in common-reloc.c acknowledge this. */ +#define RELOC_TYPE_ID(type) ((type) & 0xff) + /* This defines the common reloc hooks based on sparc_reloc.def. */ #include "common-reloc.c" |
