lto-object.c (lto_obj_begin_section): In the event that pointer sizes aren't powers of two...

* lto-object.c (lto_obj_begin_section): In the event that pointer
sizes aren't powers of two, choose a more suitable alignment
than (unsigned)(-1).

From-SVN: r216350
This commit is contained in:
DJ Delorie 2014-10-16 17:06:34 -04:00 committed by DJ Delorie
parent 8c0f01186f
commit 957f47e6c8
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2014-10-16 DJ Delorie <dj@redhat.com>
* lto-object.c (lto_obj_begin_section): In the event that pointer
sizes aren't powers of two, choose a more suitable alignment
than (unsigned)(-1).
2014-10-14 DJ Delorie <dj@redhat.com>
* lto-lang.c (lto_build_c_type_nodes): Check intN types for

View file

@ -338,7 +338,7 @@ lto_obj_begin_section (const char *name)
&& lo->sobj_w != NULL
&& lo->section == NULL);
align = exact_log2 (POINTER_SIZE / BITS_PER_UNIT);
align = ceil_log2 (POINTER_SIZE_UNITS);
lo->section = simple_object_write_create_section (lo->sobj_w, name, align,
&errmsg, &err);
if (lo->section == NULL)