New issue
Advanced search Search tips

Issue 738188 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jul 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 711461



Sign in to add a comment

gcc does not work correctly with binutils 2.27 (Feature PIE with copy relocations)

Project Member Reported by manojgupta@chromium.org, Jun 29 2017

Issue description

Upgrading binutils to 2.27 also enabled support for PIE with copy relocations.
This feature does not work correctly in the code generated by gcc (4.9.2). 

This was exposed by failures in libbrillo unittests for lakitu-paladin.
https://bugs.chromium.org/p/chromium/issues/detail?id=736534

The root cause is a gcc bug for which the patches were not backported.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
 
Blocking: 711461
Status: Verified (was: Untriaged)
Disabled  PIE with copy relocations feature in gcc for now.
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/9a87b73b1b7517d1dfcca6c3d9ccc8ef46de67f2

commit 9a87b73b1b7517d1dfcca6c3d9ccc8ef46de67f2
Author: Manoj Gupta <manojgupta@google.com>
Date: Sat Jul 08 04:30:06 2017

Disable copy reloc with pie in gcc.

This feature was getting enabled with binutils 2.27.
However, it broke libbrillo unitests.

This is because of the upstream gcc bug for which the patches were not
backported to 4.9.x branches.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
This can be removed once patches for the bug are backported to CroS
GCC 4.9.2 branch.

(Forgot to update 9999 ebuild in CL:552871.)

BUG= chromium:711461 
BUG= chromium:738188 
TEST=libbrillo tests pass (using gcc as the compiler).

Change-Id: I0b138f0b02316f1359972b513394408e00a8eba7
Reviewed-on: https://chromium-review.googlesource.com/563822
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/9a87b73b1b7517d1dfcca6c3d9ccc8ef46de67f2/sys-devel/gcc/gcc-9999.ebuild

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 15 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/manifest-internal/+/afcbf309dcb25a7fd6d1111c62092ccab096fb67

commit afcbf309dcb25a7fd6d1111c62092ccab096fb67
Author: Rahul Chaudhry <rahulchaudhry@chromium.org>
Date: Sat Jul 15 23:25:07 2017

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1286427b4754883f5457ff054973d62ea92fd6e2

commit 1286427b4754883f5457ff054973d62ea92fd6e2
Author: Rahul Chaudhry <rahulchaudhry@chromium.org>
Date: Sat Jul 15 23:25:07 2017

sys-devel/gcc: move disable-linker-pie-copyreloc patch to the gcc repo.

BUG= chromium:738188 
TEST='sudo emerge sys-devel/gcc' works.
CQ-DEPEND=CL:572073, CL:*411692

Change-Id: Iac8d8b5af24c41fa953c4b14d22562235636bf74
Reviewed-on: https://chromium-review.googlesource.com/572074
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Rahul Chaudhry <rahulchaudhry@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[delete] https://crrev.com/1ab9be3e79fc5dd3c8d1c1bdc35b86619a01d362/sys-devel/gcc/files/gcc-disable-linker-pie-copyreloc.patch
[modify] https://crrev.com/1286427b4754883f5457ff054973d62ea92fd6e2/sys-devel/gcc/gcc-9999.ebuild

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/manifest/+/7a0a5d6f2233d6d655ab1f06e178315de3b7d551

commit 7a0a5d6f2233d6d655ab1f06e178315de3b7d551
Author: Rahul Chaudhry <rahulchaudhry@chromium.org>
Date: Sat Jul 15 23:25:07 2017

manifest: update gcc pinned version.

BUG= chromium:738188 
TEST='sudo emerge sys-devel/gcc' works.
CQ-DEPEND=CL:*411692, CL:572074

Change-Id: I92876e703686a943856ed4f4d942ace0a63fab33
Reviewed-on: https://chromium-review.googlesource.com/572073
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Rahul Chaudhry <rahulchaudhry@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/7a0a5d6f2233d6d655ab1f06e178315de3b7d551/full.xml

Sign in to add a comment