+2015-11-09 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * elf64-ppc.c (ppc64_elf_size_stubs, ppc64_elf_build_stubs): Fix left
+ shift of negative value.
+ * libbfd.c (safe_read_leb128): Likewise.
+ * dwarf2.c (place_sections): Likewise.
+ * bfd-in.h (align_power): Likewise.
+ * bfd-in2.h (align_power): Likewise.
+
2015-10-30 Nick Clifton <nickc@redhat.com>
* po/zh_CN.po: Updated (simplified) Chinese translation.
/* Object and core file sections. */
#define align_power(addr, align) \
- (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align)))
+ (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
typedef struct bfd_section *sec_ptr;
/* Object and core file sections. */
#define align_power(addr, align) \
- (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align)))
+ (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
typedef struct bfd_section *sec_ptr;
/* Align the new address to the current section
alignment. */
last_vma = ((last_vma
- + ~((bfd_vma) -1 << sect->alignment_power))
- & ((bfd_vma) -1 << sect->alignment_power));
+ + ~(-((bfd_vma) 1 << sect->alignment_power)))
+ & (-((bfd_vma) 1 << sect->alignment_power)));
sect->vma = last_vma;
last_vma += sz;
}
if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
stub_sec->size = ((stub_sec->size
+ (1 << htab->params->plt_stub_align) - 1)
- & (-1 << htab->params->plt_stub_align));
+ & -(1 << htab->params->plt_stub_align));
for (stub_sec = htab->params->stub_bfd->sections;
stub_sec != NULL;
if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
stub_sec->size = ((stub_sec->size
+ (1 << htab->params->plt_stub_align) - 1)
- & (-1 << htab->params->plt_stub_align));
+ & -(1 << htab->params->plt_stub_align));
for (stub_sec = htab->params->stub_bfd->sections;
stub_sec != NULL;
*length_return = num_read;
if (sign && (shift < 8 * sizeof (result)) && (byte & 0x40))
- result |= (bfd_vma) -1 << shift;
+ result |= -((bfd_vma) 1 << shift);
return result;
}