diff options
| author | mrg <mrg@NetBSD.org> | 2004-12-08 14:57:52 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2004-12-08 14:57:52 +0000 |
| commit | e7fdb20d02cb6f0909ec055b23e86b4b5de9fa4a (patch) | |
| tree | fdc364092808e581d25f8b42cf2016dfb869140d /gnu | |
| parent | 6cd5325a7e6789e65f365598e1ec5eccbce1d26d (diff) | |
avoid 32 bit shift on 32 bit type
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/dist/binutils/bfd/elflink.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gnu/dist/binutils/bfd/elflink.c b/gnu/dist/binutils/bfd/elflink.c index 6628db34cce..a50334fde7d 100644 --- a/gnu/dist/binutils/bfd/elflink.c +++ b/gnu/dist/binutils/bfd/elflink.c @@ -7058,10 +7058,15 @@ elf_reloc_link_order (bfd *output_bfd, irel[i].r_info = 0; irel[i].r_addend = 0; } - if (bed->s->arch_size == 32) - irel[0].r_info = ELF32_R_INFO (indx, howto->type); +#ifdef BFD64 + if (bed->s->arch_size != 32) + { + u_int64_t indx64 = indx; + irel[0].r_info = ELF64_R_INFO (indx64, howto->type); + } else - irel[0].r_info = ELF64_R_INFO (indx, howto->type); +#endif + irel[0].r_info = ELF32_R_INFO (indx, howto->type); rel_hdr = &elf_section_data (output_section)->rel_hdr; erel = rel_hdr->contents; |
