All of lore.kernel.org
 help / color / mirror / Atom feed
* Build kernel error for B4860qds-64b machine
@ 2014-04-09 14:55 Alexandru Vaduva
  2014-04-10  2:58 ` Kernel Configure Morgan McKenzie
  2014-04-10  4:06 ` Build kernel error for B4860qds-64b machine ting.liu
  0 siblings, 2 replies; 6+ messages in thread
From: Alexandru Vaduva @ 2014-04-09 14:55 UTC (permalink / raw)
  To: meta-freescale

Hello guys,

I am having the following error with the kernel build for the b4860 board:
	error: bad value (e5500) for -mtune= switch
I checked the flag -mtune and it is set as: -mtune=e6500 correspondingly.
Also if I change the -mtune with something like march the error does not change.

Do some of you have any suggestions?


Alexandru Jan  Vaduva
Software Engineer

Enea Services Romania
Splaiul Independentei 319, OB403A, 
District 6, Bucharest, 
Romania, 060044

Tel:  +40 21 311 43 00 
Fax: +40 21 311 43 01
Email: Alexandru.Vaduva@enea.com
http://www.enea.com/
 






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Kernel Configure
  2014-04-09 14:55 Build kernel error for B4860qds-64b machine Alexandru Vaduva
@ 2014-04-10  2:58 ` Morgan McKenzie
  2014-04-10  8:35   ` Erik Botö
  2014-04-10  4:06 ` Build kernel error for B4860qds-64b machine ting.liu
  1 sibling, 1 reply; 6+ messages in thread
From: Morgan McKenzie @ 2014-04-10  2:58 UTC (permalink / raw)
  To: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

Hi,
I've just been looking into configuring the kernel for my board. I've read the documentation at https://community.freescale.com/docs/DOC-95045 so I know how to do it; I'm just curious about something.
In the yocto documentation, they say to add to the kernel configuration you can simply use configuration fragments http://www.yoctoproject.org/docs/1.5.1/dev-manual/dev-manual.html#creating-config-fragments rather than having to replace the entire defconfig; this would be much preferable to me as I'm trying to make my development code in its' own recipes and not have various changes needed to be made manually (for now I will probably just make my own defconfig and have it overwrite the one being copied from the freescale portion).

I took a look at the run.do_configure/compile, etc in the build directory for linux-imx and saw that there wasn't any mention of .cfg. Is the .cfg file way of doing it something that will eventually be brought into the imx code, or am I just missing something? Or is there another recommended way I've missed?
Regards,
Morgan McKenzie 		 	   		  

[-- Attachment #2: Type: text/html, Size: 1610 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Build kernel error for B4860qds-64b machine
  2014-04-09 14:55 Build kernel error for B4860qds-64b machine Alexandru Vaduva
  2014-04-10  2:58 ` Kernel Configure Morgan McKenzie
@ 2014-04-10  4:06 ` ting.liu
  2014-04-10  8:07   ` Alexandru Vaduva
  1 sibling, 1 reply; 6+ messages in thread
From: ting.liu @ 2014-04-10  4:06 UTC (permalink / raw)
  To: Alexandru Vaduva; +Cc: meta-freescale

> -----Original Message-----
> From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-
> bounces@yoctoproject.org] On Behalf Of Alexandru Vaduva
> Sent: Wednesday, April 09, 2014 10:56 PM
> To: meta-freescale@yoctoproject.org
> Subject: [meta-freescale] Build kernel error for B4860qds-64b machine
> 
> Hello guys,
> 
> I am having the following error with the kernel build for the b4860 board:
> 	error: bad value (e5500) for -mtune= switch I checked the flag -mtune
> and it is set as: -mtune=e6500 correspondingly.
> Also if I change the -mtune with something like march the error does not
> change.
> 
> Do some of you have any suggestions?

Your detailed build step?

> 
> 
> Alexandru Jan  Vaduva
> Software Engineer
> 
> Enea Services Romania
> Splaiul Independentei 319, OB403A,
> District 6, Bucharest,
> Romania, 060044
> 
> Tel:  +40 21 311 43 00
> Fax: +40 21 311 43 01
> Email: Alexandru.Vaduva@enea.com
> http://www.enea.com/
> 
> 
> 
> 
> 
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Build kernel error for B4860qds-64b machine
  2014-04-10  4:06 ` Build kernel error for B4860qds-64b machine ting.liu
@ 2014-04-10  8:07   ` Alexandru Vaduva
  2014-04-15  2:31     ` ting.liu
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandru Vaduva @ 2014-04-10  8:07 UTC (permalink / raw)
  To: ting.liu; +Cc: meta-freescale

Hello,

I did the following:
 - Cloned the poky and meta-fsl-ppc.
 - Constructed the build directory accordingly. 
	Taking into consideration that the build machine is set as b4860qds-64b and poky distro.

 - Added the following flag to the CC compiler:
        		d.setVar('KERNEL_CC_append', ' -mcmodel=large')
	It solved a problem for the missing flags like:  
		relocation truncated to fit: R_PPC64_ADDR16_HI

 - Also tried to change -mcpu flag to -mtune because it firstly complained about outdated flags:
		TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "e6500", " -mtune=e6500", "", d)}"
	| gcc: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
	|   CC      fs/char_dev.o
	| arch/powerpc/kernel/vdso32/sigtramp.S:1:0: error: bad value (e5500) for -mtune= switch  VDSO64A arch/powerpc/kernel/vdso64/gettimeofday.o
	
	The warning disappeared but the problem remained.

Thanks,
Alex

-----Original Message-----
From: ting.liu@freescale.com [mailto:ting.liu@freescale.com] 
Sent: Thursday, April 10, 2014 7:06 AM
To: Alexandru Vaduva
Cc: meta-freescale@yoctoproject.org
Subject: RE: Build kernel error for B4860qds-64b machine

> -----Original Message-----
> From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale- 
> bounces@yoctoproject.org] On Behalf Of Alexandru Vaduva
> Sent: Wednesday, April 09, 2014 10:56 PM
> To: meta-freescale@yoctoproject.org
> Subject: [meta-freescale] Build kernel error for B4860qds-64b machine
> 
> Hello guys,
> 
> I am having the following error with the kernel build for the b4860 board:
> 	error: bad value (e5500) for -mtune= switch I checked the flag -mtune 
> and it is set as: -mtune=e6500 correspondingly.
> Also if I change the -mtune with something like march the error does 
> not change.
> 
> Do some of you have any suggestions?

Your detailed build step?

> 
> 
> Alexandru Jan  Vaduva
> Software Engineer
> 
> Enea Services Romania
> Splaiul Independentei 319, OB403A,
> District 6, Bucharest,
> Romania, 060044
> 
> Tel:  +40 21 311 43 00
> Fax: +40 21 311 43 01
> Email: Alexandru.Vaduva@enea.com
> http://www.enea.com/
> 
> 
> 
> 
> 
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kernel Configure
  2014-04-10  2:58 ` Kernel Configure Morgan McKenzie
@ 2014-04-10  8:35   ` Erik Botö
  0 siblings, 0 replies; 6+ messages in thread
From: Erik Botö @ 2014-04-10  8:35 UTC (permalink / raw)
  To: Morgan McKenzie; +Cc: meta-freescale

Hi,

If I'm not mistaken the .cfg snippets can only be used with kernels
based on the linux-yocto kernels, which the kernels in meta-fsl-arm*
are not. So the defconfig is the way to go.

Cheers,
Erik

On Thu, Apr 10, 2014 at 4:58 AM, Morgan McKenzie <rmtm@uvic.ca> wrote:
> Hi,
>
> I've just been looking into configuring the kernel for my board. I've read
> the documentation at https://community.freescale.com/docs/DOC-95045 so I
> know how to do it; I'm just curious about something.
>
> In the yocto documentation, they say to add to the kernel configuration you
> can simply use configuration fragments
> http://www.yoctoproject.org/docs/1.5.1/dev-manual/dev-manual.html#creating-config-fragments
> rather than having to replace the entire defconfig; this would be much
> preferable to me as I'm trying to make my development code in its' own
> recipes and not have various changes needed to be made manually (for now I
> will probably just make my own defconfig and have it overwrite the one being
> copied from the freescale portion).
>
> I took a look at the run.do_configure/compile, etc in the build directory
> for linux-imx and saw that there wasn't any mention of .cfg. Is the .cfg
> file way of doing it something that will eventually be brought into the imx
> code, or am I just missing something? Or is there another recommended way
> I've missed?
>
> Regards,
>
> Morgan McKenzie
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Build kernel error for B4860qds-64b machine
  2014-04-10  8:07   ` Alexandru Vaduva
@ 2014-04-15  2:31     ` ting.liu
  0 siblings, 0 replies; 6+ messages in thread
From: ting.liu @ 2014-04-15  2:31 UTC (permalink / raw)
  To: Alexandru Vaduva, alexandru.sardan; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 2928 bytes --]

64bit kernel has build issue with binutils 2.24. please try to use the attached patch to go around this problem temporarly.

-Ting

> -----Original Message-----
> From: Alexandru Vaduva [mailto:Alexandru.Vaduva@enea.com]
> Sent: Thursday, April 10, 2014 4:07 PM
> To: Liu Ting-B28495
> Cc: meta-freescale@yoctoproject.org
> Subject: RE: Build kernel error for B4860qds-64b machine
> 
> Hello,
> 
> I did the following:
>  - Cloned the poky and meta-fsl-ppc.
>  - Constructed the build directory accordingly.
> 	Taking into consideration that the build machine is set as b4860qds-64b
> and poky distro.
> 
>  - Added the following flag to the CC compiler:
>         		d.setVar('KERNEL_CC_append', ' -mcmodel=large')
> 	It solved a problem for the missing flags like:
> 		relocation truncated to fit: R_PPC64_ADDR16_HI
> 
>  - Also tried to change -mcpu flag to -mtune because it firstly complained
> about outdated flags:
> 		TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "e6500", "
> -mtune=e6500", "", d)}"
> 	| gcc: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march='
> instead
> 	|   CC      fs/char_dev.o
> 	| arch/powerpc/kernel/vdso32/sigtramp.S:1:0: error: bad value (e5500)
> for -mtune= switch  VDSO64A arch/powerpc/kernel/vdso64/gettimeofday.o
> 
> 	The warning disappeared but the problem remained.
> 
> Thanks,
> Alex
> 
> -----Original Message-----
> From: ting.liu@freescale.com [mailto:ting.liu@freescale.com]
> Sent: Thursday, April 10, 2014 7:06 AM
> To: Alexandru Vaduva
> Cc: meta-freescale@yoctoproject.org
> Subject: RE: Build kernel error for B4860qds-64b machine
> 
> > -----Original Message-----
> > From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-
> > bounces@yoctoproject.org] On Behalf Of Alexandru Vaduva
> > Sent: Wednesday, April 09, 2014 10:56 PM
> > To: meta-freescale@yoctoproject.org
> > Subject: [meta-freescale] Build kernel error for B4860qds-64b machine
> >
> > Hello guys,
> >
> > I am having the following error with the kernel build for the b4860 board:
> > 	error: bad value (e5500) for -mtune= switch I checked the flag -mtune
> > and it is set as: -mtune=e6500 correspondingly.
> > Also if I change the -mtune with something like march the error does
> > not change.
> >
> > Do some of you have any suggestions?
> 
> Your detailed build step?
> 
> >
> >
> > Alexandru Jan  Vaduva
> > Software Engineer
> >
> > Enea Services Romania
> > Splaiul Independentei 319, OB403A,
> > District 6, Bucharest,
> > Romania, 060044
> >
> > Tel:  +40 21 311 43 00
> > Fax: +40 21 311 43 01
> > Email: Alexandru.Vaduva@enea.com
> > http://www.enea.com/
> >
> >
> >
> >
> >
> > --
> > _______________________________________________
> > meta-freescale mailing list
> > meta-freescale@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/meta-freescale
> >
> 
> 


[-- Attachment #2: 0001-binutils-Revert-relocation-changes-for-PPC.patch --]
[-- Type: application/octet-stream, Size: 43292 bytes --]

From 8395e9552f0115a39e824b6591fe408c9543ff20 Mon Sep 17 00:00:00 2001
From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
Date: Fri, 11 Apr 2014 17:15:45 +0300
Subject: [PATCH] binutils: Revert relocation changes for PPC

Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
---
 meta/recipes-devtools/binutils/binutils-2.24.inc   |    1 +
 ...rt-overflow-on-PowerPC64-h-and-ha-relocat.patch | 1087 ++++++++++++++++++++
 2 files changed, 1088 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/0001-Revert-Report-overflow-on-PowerPC64-h-and-ha-relocat.patch

diff --git a/meta/recipes-devtools/binutils/binutils-2.24.inc b/meta/recipes-devtools/binutils/binutils-2.24.inc
index 6415a6f..3d0dd71 100644
--- a/meta/recipes-devtools/binutils/binutils-2.24.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.24.inc
@@ -30,6 +30,7 @@ SRC_URI = "\
      file://fix-pr16476.patch \
      file://fix-pr16428a.patch \
      file://fix-pr16428b.patch \
+     file://0001-Revert-Report-overflow-on-PowerPC64-h-and-ha-relocat.patch \
      "
 
 SRC_URI[md5sum] = "e0f71a7b2ddab0f8612336ac81d9636b"
diff --git a/meta/recipes-devtools/binutils/binutils/0001-Revert-Report-overflow-on-PowerPC64-h-and-ha-relocat.patch b/meta/recipes-devtools/binutils/binutils/0001-Revert-Report-overflow-on-PowerPC64-h-and-ha-relocat.patch
new file mode 100644
index 0000000..bda760f
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0001-Revert-Report-overflow-on-PowerPC64-h-and-ha-relocat.patch
@@ -0,0 +1,1087 @@
+From 269bee7df1abfdc230f1ed6a6de3150adffde962 Mon Sep 17 00:00:00 2001
+From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
+Date: Fri, 11 Apr 2014 16:15:36 +0300
+Subject: [PATCH] Revert 'Report overflow on PowerPC64 @h and @ha
+ relocations.' patch
+
+---
+ bfd/elf64-ppc.c     |  183 +++++++++------------------------------------------
+ bfd/reloc.c         |   12 ----
+ elfcpp/powerpc.h    |    6 --
+ gas/config/tc-ppc.c |  139 ++++++++++----------------------------
+ gold/powerpc.cc     |  130 +++++++++++-------------------------
+ include/elf/ppc64.h |   13 +---
+ 6 files changed, 109 insertions(+), 374 deletions(-)
+
+diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
+index bf13a5d..ba3c655 100644
+--- a/bfd/elf64-ppc.c
++++ b/bfd/elf64-ppc.c
+@@ -327,7 +327,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 bfd_elf_generic_reloc,	/* special_function */
+ 	 "R_PPC64_ADDR16_HI",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -343,7 +343,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_ha_reloc,	/* special_function */
+ 	 "R_PPC64_ADDR16_HA",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -505,7 +505,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed,/* complain_on_overflow */
++	 complain_overflow_dont,/* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_GOT16_HI",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -521,7 +521,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed,/* complain_on_overflow */
++	 complain_overflow_dont,/* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_GOT16_HA",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -698,7 +698,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_PLT16_HI",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -714,7 +714,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_PLT16_HA",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -759,7 +759,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_sectoff_reloc, /* special_function */
+ 	 "R_PPC64_SECTOFF_HI",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -774,7 +774,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_sectoff_ha_reloc, /* special_function */
+ 	 "R_PPC64_SECTOFF_HA",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -981,7 +981,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_toc_reloc,	/* special_function */
+ 	 "R_PPC64_TOC16_HI",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1000,7 +1000,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_toc_ha_reloc, /* special_function */
+ 	 "R_PPC64_TOC16_HA",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1072,7 +1072,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_PLTGOT16_HI",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1090,7 +1090,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont,/* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_PLTGOT16_HA",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1392,7 +1392,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_DTPREL16_HI",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1407,7 +1407,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_DTPREL16_HA",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1558,7 +1558,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_TPREL16_HI",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1573,7 +1573,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_TPREL16_HA",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1710,7 +1710,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_GOT_TLSGD16_HI", /* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1725,7 +1725,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_GOT_TLSGD16_HA", /* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1772,7 +1772,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_GOT_TLSLD16_HI", /* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1787,7 +1787,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_GOT_TLSLD16_HA", /* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1833,7 +1833,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_GOT_DTPREL16_HI", /* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1848,7 +1848,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_GOT_DTPREL16_HA", /* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1894,7 +1894,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_GOT_TPREL16_HI", /* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1909,7 +1909,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 FALSE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_unhandled_reloc, /* special_function */
+ 	 "R_PPC64_GOT_TPREL16_HA", /* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1982,7 +1982,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 TRUE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 bfd_elf_generic_reloc,	/* special_function */
+ 	 "R_PPC64_REL16_HI",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -1998,7 +1998,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 16,			/* bitsize */
+ 	 TRUE,			/* pc_relative */
+ 	 0,			/* bitpos */
+-	 complain_overflow_signed, /* complain_on_overflow */
++	 complain_overflow_dont, /* complain_on_overflow */
+ 	 ppc64_elf_ha_reloc,	/* special_function */
+ 	 "R_PPC64_REL16_HA",	/* name */
+ 	 FALSE,			/* partial_inplace */
+@@ -2006,96 +2006,6 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
+ 	 0xffff,		/* dst_mask */
+ 	 TRUE),			/* pcrel_offset */
+ 
+-  /* Like R_PPC64_ADDR16_HI, but no overflow.  */
+-  HOWTO (R_PPC64_ADDR16_HIGH,	/* type */
+-	 16,			/* rightshift */
+-	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+-	 16,			/* bitsize */
+-	 FALSE,			/* pc_relative */
+-	 0,			/* bitpos */
+-	 complain_overflow_dont, /* complain_on_overflow */
+-	 bfd_elf_generic_reloc,	/* special_function */
+-	 "R_PPC64_ADDR16_HIGH",	/* name */
+-	 FALSE,			/* partial_inplace */
+-	 0,			/* src_mask */
+-	 0xffff,		/* dst_mask */
+-	 FALSE),		/* pcrel_offset */
+-
+-  /* Like R_PPC64_ADDR16_HA, but no overflow.  */
+-  HOWTO (R_PPC64_ADDR16_HIGHA,	/* type */
+-	 16,			/* rightshift */
+-	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+-	 16,			/* bitsize */
+-	 FALSE,			/* pc_relative */
+-	 0,			/* bitpos */
+-	 complain_overflow_dont, /* complain_on_overflow */
+-	 ppc64_elf_ha_reloc,	/* special_function */
+-	 "R_PPC64_ADDR16_HIGHA",	/* name */
+-	 FALSE,			/* partial_inplace */
+-	 0,			/* src_mask */
+-	 0xffff,		/* dst_mask */
+-	 FALSE),		/* pcrel_offset */
+-
+-  /* Like R_PPC64_DTPREL16_HI, but no overflow.  */
+-  HOWTO (R_PPC64_DTPREL16_HIGH,
+-	 16,			/* rightshift */
+-	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+-	 16,			/* bitsize */
+-	 FALSE,			/* pc_relative */
+-	 0,			/* bitpos */
+-	 complain_overflow_dont, /* complain_on_overflow */
+-	 ppc64_elf_unhandled_reloc, /* special_function */
+-	 "R_PPC64_DTPREL16_HIGH", /* name */
+-	 FALSE,			/* partial_inplace */
+-	 0,			/* src_mask */
+-	 0xffff,		/* dst_mask */
+-	 FALSE),		/* pcrel_offset */
+-
+-  /* Like R_PPC64_DTPREL16_HA, but no overflow.  */
+-  HOWTO (R_PPC64_DTPREL16_HIGHA,
+-	 16,			/* rightshift */
+-	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+-	 16,			/* bitsize */
+-	 FALSE,			/* pc_relative */
+-	 0,			/* bitpos */
+-	 complain_overflow_dont, /* complain_on_overflow */
+-	 ppc64_elf_unhandled_reloc, /* special_function */
+-	 "R_PPC64_DTPREL16_HIGHA", /* name */
+-	 FALSE,			/* partial_inplace */
+-	 0,			/* src_mask */
+-	 0xffff,		/* dst_mask */
+-	 FALSE),		/* pcrel_offset */
+-
+-  /* Like R_PPC64_TPREL16_HI, but no overflow.  */
+-  HOWTO (R_PPC64_TPREL16_HIGH,
+-	 16,			/* rightshift */
+-	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+-	 16,			/* bitsize */
+-	 FALSE,			/* pc_relative */
+-	 0,			/* bitpos */
+-	 complain_overflow_dont, /* complain_on_overflow */
+-	 ppc64_elf_unhandled_reloc, /* special_function */
+-	 "R_PPC64_TPREL16_HIGH",	/* name */
+-	 FALSE,			/* partial_inplace */
+-	 0,			/* src_mask */
+-	 0xffff,		/* dst_mask */
+-	 FALSE),		/* pcrel_offset */
+-
+-  /* Like R_PPC64_TPREL16_HA, but no overflow.  */
+-  HOWTO (R_PPC64_TPREL16_HIGHA,
+-	 16,			/* rightshift */
+-	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+-	 16,			/* bitsize */
+-	 FALSE,			/* pc_relative */
+-	 0,			/* bitpos */
+-	 complain_overflow_dont, /* complain_on_overflow */
+-	 ppc64_elf_unhandled_reloc, /* special_function */
+-	 "R_PPC64_TPREL16_HIGHA",	/* name */
+-	 FALSE,			/* partial_inplace */
+-	 0,			/* src_mask */
+-	 0xffff,		/* dst_mask */
+-	 FALSE),		/* pcrel_offset */
+-
+   /* GNU extension to record C++ vtable hierarchy.  */
+   HOWTO (R_PPC64_GNU_VTINHERIT,	/* type */
+ 	 0,			/* rightshift */
+@@ -2174,12 +2084,8 @@ ppc64_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+       break;
+     case BFD_RELOC_HI16:			r = R_PPC64_ADDR16_HI;
+       break;
+-    case BFD_RELOC_PPC64_ADDR16_HIGH:		r = R_PPC64_ADDR16_HIGH;
+-      break;
+     case BFD_RELOC_HI16_S:			r = R_PPC64_ADDR16_HA;
+       break;
+-    case BFD_RELOC_PPC64_ADDR16_HIGHA:		r = R_PPC64_ADDR16_HIGHA;
+-      break;
+     case BFD_RELOC_PPC_BA16:			r = R_PPC64_ADDR14;
+       break;
+     case BFD_RELOC_PPC_BA16_BRTAKEN:		r = R_PPC64_ADDR14_BRTAKEN;
+@@ -2298,12 +2204,8 @@ ppc64_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+       break;
+     case BFD_RELOC_PPC_TPREL16_HI:		r = R_PPC64_TPREL16_HI;
+       break;
+-    case BFD_RELOC_PPC64_TPREL16_HIGH:		r = R_PPC64_TPREL16_HIGH;
+-      break;
+     case BFD_RELOC_PPC_TPREL16_HA:		r = R_PPC64_TPREL16_HA;
+       break;
+-    case BFD_RELOC_PPC64_TPREL16_HIGHA:		r = R_PPC64_TPREL16_HIGHA;
+-      break;
+     case BFD_RELOC_PPC_TPREL:			r = R_PPC64_TPREL64;
+       break;
+     case BFD_RELOC_PPC_DTPREL16:		r = R_PPC64_DTPREL16;
+@@ -2312,12 +2214,8 @@ ppc64_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+       break;
+     case BFD_RELOC_PPC_DTPREL16_HI:		r = R_PPC64_DTPREL16_HI;
+       break;
+-    case BFD_RELOC_PPC64_DTPREL16_HIGH:		r = R_PPC64_DTPREL16_HIGH;
+-      break;
+     case BFD_RELOC_PPC_DTPREL16_HA:		r = R_PPC64_DTPREL16_HA;
+       break;
+-    case BFD_RELOC_PPC64_DTPREL16_HIGHA:	r = R_PPC64_DTPREL16_HIGHA;
+-      break;
+     case BFD_RELOC_PPC_DTPREL:			r = R_PPC64_DTPREL64;
+       break;
+     case BFD_RELOC_PPC_GOT_TLSGD16:		r = R_PPC64_GOT_TLSGD16;
+@@ -3662,8 +3560,6 @@ must_be_dyn_reloc (struct bfd_link_info *info,
+     case R_PPC64_TPREL16_HA:
+     case R_PPC64_TPREL16_DS:
+     case R_PPC64_TPREL16_LO_DS:
+-    case R_PPC64_TPREL16_HIGH:
+-    case R_PPC64_TPREL16_HIGHA:
+     case R_PPC64_TPREL16_HIGHER:
+     case R_PPC64_TPREL16_HIGHERA:
+     case R_PPC64_TPREL16_HIGHEST:
+@@ -5394,8 +5290,6 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
+ 	case R_PPC64_DTPREL16_HA:
+ 	case R_PPC64_DTPREL16_DS:
+ 	case R_PPC64_DTPREL16_LO_DS:
+-	case R_PPC64_DTPREL16_HIGH:
+-	case R_PPC64_DTPREL16_HIGHA:
+ 	case R_PPC64_DTPREL16_HIGHER:
+ 	case R_PPC64_DTPREL16_HIGHERA:
+ 	case R_PPC64_DTPREL16_HIGHEST:
+@@ -5556,8 +5450,6 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
+ 	case R_PPC64_TPREL16_HA:
+ 	case R_PPC64_TPREL16_DS:
+ 	case R_PPC64_TPREL16_LO_DS:
+-	case R_PPC64_TPREL16_HIGH:
+-	case R_PPC64_TPREL16_HIGHA:
+ 	case R_PPC64_TPREL16_HIGHER:
+ 	case R_PPC64_TPREL16_HIGHERA:
+ 	case R_PPC64_TPREL16_HIGHEST:
+@@ -5605,8 +5497,6 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
+ 	case R_PPC64_ADDR16_DS:
+ 	case R_PPC64_ADDR16_HA:
+ 	case R_PPC64_ADDR16_HI:
+-	case R_PPC64_ADDR16_HIGH:
+-	case R_PPC64_ADDR16_HIGHA:
+ 	case R_PPC64_ADDR16_HIGHER:
+ 	case R_PPC64_ADDR16_HIGHERA:
+ 	case R_PPC64_ADDR16_HIGHEST:
+@@ -7363,8 +7253,6 @@ dec_dynrel_count (bfd_vma r_info,
+     case R_PPC64_TPREL16_HA:
+     case R_PPC64_TPREL16_DS:
+     case R_PPC64_TPREL16_LO_DS:
+-    case R_PPC64_TPREL16_HIGH:
+-    case R_PPC64_TPREL16_HIGHA:
+     case R_PPC64_TPREL16_HIGHER:
+     case R_PPC64_TPREL16_HIGHERA:
+     case R_PPC64_TPREL16_HIGHEST:
+@@ -7386,8 +7274,6 @@ dec_dynrel_count (bfd_vma r_info,
+     case R_PPC64_ADDR16_DS:
+     case R_PPC64_ADDR16_HA:
+     case R_PPC64_ADDR16_HI:
+-    case R_PPC64_ADDR16_HIGH:
+-    case R_PPC64_ADDR16_HIGHA:
+     case R_PPC64_ADDR16_HIGHER:
+     case R_PPC64_ADDR16_HIGHERA:
+     case R_PPC64_ADDR16_HIGHEST:
+@@ -14091,8 +13977,6 @@ ppc64_elf_relocate_section (bfd *output_bfd,
+ 	case R_PPC64_TPREL16_HA:
+ 	case R_PPC64_TPREL16_DS:
+ 	case R_PPC64_TPREL16_LO_DS:
+-	case R_PPC64_TPREL16_HIGH:
+-	case R_PPC64_TPREL16_HIGHA:
+ 	case R_PPC64_TPREL16_HIGHER:
+ 	case R_PPC64_TPREL16_HIGHERA:
+ 	case R_PPC64_TPREL16_HIGHEST:
+@@ -14127,8 +14011,6 @@ ppc64_elf_relocate_section (bfd *output_bfd,
+ 	case R_PPC64_DTPREL16_HA:
+ 	case R_PPC64_DTPREL16_DS:
+ 	case R_PPC64_DTPREL16_LO_DS:
+-	case R_PPC64_DTPREL16_HIGH:
+-	case R_PPC64_DTPREL16_HIGHA:
+ 	case R_PPC64_DTPREL16_HIGHER:
+ 	case R_PPC64_DTPREL16_HIGHERA:
+ 	case R_PPC64_DTPREL16_HIGHEST:
+@@ -14161,8 +14043,6 @@ ppc64_elf_relocate_section (bfd *output_bfd,
+ 	case R_PPC64_ADDR16_DS:
+ 	case R_PPC64_ADDR16_HA:
+ 	case R_PPC64_ADDR16_HI:
+-	case R_PPC64_ADDR16_HIGH:
+-	case R_PPC64_ADDR16_HIGHA:
+ 	case R_PPC64_ADDR16_HIGHER:
+ 	case R_PPC64_ADDR16_HIGHERA:
+ 	case R_PPC64_ADDR16_HIGHEST:
+@@ -14477,20 +14357,21 @@ ppc64_elf_relocate_section (bfd *output_bfd,
+ 	default:
+ 	  break;
+ 
+-	case R_PPC64_REL16_HA:
+ 	case R_PPC64_ADDR16_HA:
+-	case R_PPC64_ADDR16_HIGHA:
++	case R_PPC64_REL16_HA:
+ 	case R_PPC64_ADDR16_HIGHERA:
+ 	case R_PPC64_ADDR16_HIGHESTA:
+ 	case R_PPC64_TOC16_HA:
+ 	case R_PPC64_SECTOFF_HA:
+ 	case R_PPC64_TPREL16_HA:
+-	case R_PPC64_TPREL16_HIGHA:
++	case R_PPC64_DTPREL16_HA:
++	case R_PPC64_TPREL16_HIGHER:
+ 	case R_PPC64_TPREL16_HIGHERA:
++	case R_PPC64_TPREL16_HIGHEST:
+ 	case R_PPC64_TPREL16_HIGHESTA:
+-	case R_PPC64_DTPREL16_HA:
+-	case R_PPC64_DTPREL16_HIGHA:
++	case R_PPC64_DTPREL16_HIGHER:
+ 	case R_PPC64_DTPREL16_HIGHERA:
++	case R_PPC64_DTPREL16_HIGHEST:
+ 	case R_PPC64_DTPREL16_HIGHESTA:
+ 	  /* It's just possible that this symbol is a weak symbol
+ 	     that's not actually defined anywhere. In that case,
+diff --git a/bfd/reloc.c b/bfd/reloc.c
+index 77a04f8..cc34760 100644
+--- a/bfd/reloc.c
++++ b/bfd/reloc.c
+@@ -2895,10 +2895,6 @@ ENUMX
+   BFD_RELOC_PPC64_PLTGOT16_DS
+ ENUMX
+   BFD_RELOC_PPC64_PLTGOT16_LO_DS
+-ENUMX
+-  BFD_RELOC_PPC64_ADDR16_HIGH
+-ENUMX
+-  BFD_RELOC_PPC64_ADDR16_HIGHA
+ ENUMDOC
+   Power(rs6000) and PowerPC relocations.
+ 
+@@ -2986,14 +2982,6 @@ ENUMX
+   BFD_RELOC_PPC64_DTPREL16_HIGHEST
+ ENUMX
+   BFD_RELOC_PPC64_DTPREL16_HIGHESTA
+-ENUMX
+-  BFD_RELOC_PPC64_TPREL16_HIGH
+-ENUMX
+-  BFD_RELOC_PPC64_TPREL16_HIGHA
+-ENUMX
+-  BFD_RELOC_PPC64_DTPREL16_HIGH
+-ENUMX
+-  BFD_RELOC_PPC64_DTPREL16_HIGHA
+ ENUMDOC
+   PowerPC and PowerPC64 thread-local storage relocations.
+ 
+diff --git a/elfcpp/powerpc.h b/elfcpp/powerpc.h
+index 98354a2..0f13eda 100644
+--- a/elfcpp/powerpc.h
++++ b/elfcpp/powerpc.h
+@@ -164,17 +164,11 @@ enum
+   R_PPC_EMB_SDA21 = 109,
+   R_PPC64_TOCSAVE = 109,
+   R_PPC_EMB_MRKREF = 110,
+-  R_PPC64_ADDR16_HIGH = 110,
+   R_PPC_EMB_RELSEC16 = 111,
+-  R_PPC64_ADDR16_HIGHA = 111,
+   R_PPC_EMB_RELST_LO = 112,
+-  R_PPC64_TPREL16_HIGH = 112,
+   R_PPC_EMB_RELST_HI = 113,
+-  R_PPC64_TPREL16_HIGHA = 113,
+   R_PPC_EMB_RELST_HA = 114,
+-  R_PPC64_DTPREL16_HIGH = 114,
+   R_PPC_EMB_BIT_FLD = 115,
+-  R_PPC64_DTPREL16_HIGHA = 115,
+   R_PPC_EMB_RELSDA = 116,
+ 
+   R_PPC_VLE_REL8 = 216,
+diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
+index 7c99e43..d888aee 100644
+--- a/gas/config/tc-ppc.c
++++ b/gas/config/tc-ppc.c
+@@ -87,11 +87,7 @@ static int set_target_endian = 0;
+    compensating for #lo being treated as a signed number.  */
+ #define PPC_HIGHESTA(v) PPC_HIGHEST ((v) + 0x8000)
+ 
+-#define SEX16(val) (((val) ^ 0x8000) - 0x8000)
+-
+-/* For the time being on ppc64, don't report overflow on @h and @ha
+-   applied to constants.  */
+-#define REPORT_OVERFLOW_HI 0
++#define SEX16(val) ((((val) & 0xffff) ^ 0x8000) - 0x8000)
+ 
+ static bfd_boolean reg_names_p = TARGET_REG_NAMES_P;
+ 
+@@ -1935,8 +1931,6 @@ ppc_elf_suffix (char **str_p, expressionS *exp_p)
+     MAP32 ("bitfld",		BFD_RELOC_PPC_EMB_BIT_FLD),
+     MAP32 ("relsda",		BFD_RELOC_PPC_EMB_RELSDA),
+     MAP32 ("xgot",		BFD_RELOC_PPC_TOC16),
+-    MAP64 ("high",		BFD_RELOC_PPC64_ADDR16_HIGH),
+-    MAP64 ("higha",		BFD_RELOC_PPC64_ADDR16_HIGHA),
+     MAP64 ("higher",		BFD_RELOC_PPC64_HIGHER),
+     MAP64 ("highera",		BFD_RELOC_PPC64_HIGHER_S),
+     MAP64 ("highest",		BFD_RELOC_PPC64_HIGHEST),
+@@ -1946,14 +1940,10 @@ ppc_elf_suffix (char **str_p, expressionS *exp_p)
+     MAP64 ("toc@l",		BFD_RELOC_PPC64_TOC16_LO),
+     MAP64 ("toc@h",		BFD_RELOC_PPC64_TOC16_HI),
+     MAP64 ("toc@ha",		BFD_RELOC_PPC64_TOC16_HA),
+-    MAP64 ("dtprel@high",	BFD_RELOC_PPC64_DTPREL16_HIGH),
+-    MAP64 ("dtprel@higha",	BFD_RELOC_PPC64_DTPREL16_HIGHA),
+     MAP64 ("dtprel@higher",	BFD_RELOC_PPC64_DTPREL16_HIGHER),
+     MAP64 ("dtprel@highera",	BFD_RELOC_PPC64_DTPREL16_HIGHERA),
+     MAP64 ("dtprel@highest",	BFD_RELOC_PPC64_DTPREL16_HIGHEST),
+     MAP64 ("dtprel@highesta",	BFD_RELOC_PPC64_DTPREL16_HIGHESTA),
+-    MAP64 ("tprel@high",	BFD_RELOC_PPC64_TPREL16_HIGH),
+-    MAP64 ("tprel@higha",	BFD_RELOC_PPC64_TPREL16_HIGHA),
+     MAP64 ("tprel@higher",	BFD_RELOC_PPC64_TPREL16_HIGHER),
+     MAP64 ("tprel@highera",	BFD_RELOC_PPC64_TPREL16_HIGHERA),
+     MAP64 ("tprel@highest",	BFD_RELOC_PPC64_TPREL16_HIGHEST),
+@@ -2923,76 +2913,55 @@ md_assemble (char *str)
+ 		break;
+ 
+ 	      case BFD_RELOC_LO16:
+-		ex.X_add_number &= 0xffff;
+-		if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
++		/* X_unsigned is the default, so if the user has done
++		   something which cleared it, we always produce a
++		   signed value.  */
++		if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
++		  ex.X_add_number &= 0xffff;
++		else
+ 		  ex.X_add_number = SEX16 (ex.X_add_number);
+ 		break;
+ 
+ 	      case BFD_RELOC_HI16:
+-		if (REPORT_OVERFLOW_HI && ppc_obj64)
+-		  {
+-		    /* PowerPC64 @h is tested for overflow.  */
+-		    ex.X_add_number = (addressT) ex.X_add_number >> 16;
+-		    if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
+-		      {
+-			addressT sign = (((addressT) -1 >> 16) + 1) >> 1;
+-			ex.X_add_number
+-			  = ((addressT) ex.X_add_number ^ sign) - sign;
+-		      }
+-		    break;
+-		  }
+-		/* Fall thru */
+-
+-	      case BFD_RELOC_PPC64_ADDR16_HIGH:
+-		ex.X_add_number = PPC_HI (ex.X_add_number);
+-		if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
+-		  ex.X_add_number = SEX16 (ex.X_add_number);
++		if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
++		  ex.X_add_number = PPC_HI (ex.X_add_number);
++		else
++		  ex.X_add_number = SEX16 (PPC_HI (ex.X_add_number));
+ 		break;
+ 
+ 	      case BFD_RELOC_HI16_S:
+-		if (REPORT_OVERFLOW_HI && ppc_obj64)
+-		  {
+-		    /* PowerPC64 @ha is tested for overflow.  */
+-		    ex.X_add_number
+-		      = ((addressT) ex.X_add_number + 0x8000) >> 16;
+-		    if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
+-		      {
+-			addressT sign = (((addressT) -1 >> 16) + 1) >> 1;
+-			ex.X_add_number
+-			  = ((addressT) ex.X_add_number ^ sign) - sign;
+-		      }
+-		    break;
+-		  }
+-		/* Fall thru */
+-
+-	      case BFD_RELOC_PPC64_ADDR16_HIGHA:
+-		ex.X_add_number = PPC_HA (ex.X_add_number);
+-		if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
+-		  ex.X_add_number = SEX16 (ex.X_add_number);
++		if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
++		  ex.X_add_number = PPC_HA (ex.X_add_number);
++		else
++		  ex.X_add_number = SEX16 (PPC_HA (ex.X_add_number));
+ 		break;
+ 
+ 	      case BFD_RELOC_PPC64_HIGHER:
+-		ex.X_add_number = PPC_HIGHER (ex.X_add_number);
+-		if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
+-		  ex.X_add_number = SEX16 (ex.X_add_number);
++		if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
++		  ex.X_add_number = PPC_HIGHER (ex.X_add_number);
++		else
++		  ex.X_add_number = SEX16 (PPC_HIGHER (ex.X_add_number));
+ 		break;
+ 
+ 	      case BFD_RELOC_PPC64_HIGHER_S:
+-		ex.X_add_number = PPC_HIGHERA (ex.X_add_number);
+-		if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
+-		  ex.X_add_number = SEX16 (ex.X_add_number);
++		if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
++		  ex.X_add_number = PPC_HIGHERA (ex.X_add_number);
++		else
++		  ex.X_add_number = SEX16 (PPC_HIGHERA (ex.X_add_number));
+ 		break;
+ 
+ 	      case BFD_RELOC_PPC64_HIGHEST:
+-		ex.X_add_number = PPC_HIGHEST (ex.X_add_number);
+-		if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
+-		  ex.X_add_number = SEX16 (ex.X_add_number);
++		if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
++		  ex.X_add_number = PPC_HIGHEST (ex.X_add_number);
++		else
++		  ex.X_add_number = SEX16 (PPC_HIGHEST (ex.X_add_number));
+ 		break;
+ 
+ 	      case BFD_RELOC_PPC64_HIGHEST_S:
+-		ex.X_add_number = PPC_HIGHESTA (ex.X_add_number);
+-		if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
+-		  ex.X_add_number = SEX16 (ex.X_add_number);
++		if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
++		  ex.X_add_number = PPC_HIGHESTA (ex.X_add_number);
++		else
++		  ex.X_add_number = SEX16 (PPC_HIGHESTA (ex.X_add_number));
+ 		break;
+ 	      }
+ #endif /* OBJ_ELF */
+@@ -6566,51 +6535,25 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
+       fieldval = value & 0xffff;
+     sign_extend_16:
+       if (operand != NULL && (operand->flags & PPC_OPERAND_SIGNED) != 0)
+-	fieldval = SEX16 (fieldval);
++	fieldval = (fieldval ^ 0x8000) - 0x8000;
+       fixP->fx_no_overflow = 1;
+       break;
+ 
+-    case BFD_RELOC_HI16:
+-    case BFD_RELOC_HI16_PCREL:
+ #ifdef OBJ_ELF
+-      if (REPORT_OVERFLOW_HI && ppc_obj64)
+-	{
+-	  fieldval = value >> 16;
+-	  if (operand != NULL && (operand->flags & PPC_OPERAND_SIGNED) != 0)
+-	    {
+-	      valueT sign = (((valueT) -1 >> 16) + 1) >> 1;
+-	      fieldval = ((valueT) fieldval ^ sign) - sign;
+-	    }
+-	  break;
+-	}
+-      /* Fall thru */
+-
+     case BFD_RELOC_PPC_VLE_HI16A:
+     case BFD_RELOC_PPC_VLE_HI16D:
+-    case BFD_RELOC_PPC64_ADDR16_HIGH:
+ #endif
++    case BFD_RELOC_HI16:
++    case BFD_RELOC_HI16_PCREL:
+       fieldval = PPC_HI (value);
+       goto sign_extend_16;
+ 
+-    case BFD_RELOC_HI16_S:
+-    case BFD_RELOC_HI16_S_PCREL:
+ #ifdef OBJ_ELF
+-      if (REPORT_OVERFLOW_HI && ppc_obj64)
+-	{
+-	  fieldval = (value + 0x8000) >> 16;
+-	  if (operand != NULL && (operand->flags & PPC_OPERAND_SIGNED) != 0)
+-	    {
+-	      valueT sign = (((valueT) -1 >> 16) + 1) >> 1;
+-	      fieldval = ((valueT) fieldval ^ sign) - sign;
+-	    }
+-	  break;
+-	}
+-      /* Fall thru */
+-
+     case BFD_RELOC_PPC_VLE_HA16A:
+     case BFD_RELOC_PPC_VLE_HA16D:
+-    case BFD_RELOC_PPC64_ADDR16_HIGHA:
+ #endif
++    case BFD_RELOC_HI16_S:
++    case BFD_RELOC_HI16_S_PCREL:
+       fieldval = PPC_HA (value);
+       goto sign_extend_16;
+ 
+@@ -6673,14 +6616,10 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
+ 	case BFD_RELOC_PPC_GOT_DTPREL16_HA:
+ 	case BFD_RELOC_PPC64_TPREL16_DS:
+ 	case BFD_RELOC_PPC64_TPREL16_LO_DS:
+-	case BFD_RELOC_PPC64_TPREL16_HIGH:
+-	case BFD_RELOC_PPC64_TPREL16_HIGHA:
+ 	case BFD_RELOC_PPC64_TPREL16_HIGHER:
+ 	case BFD_RELOC_PPC64_TPREL16_HIGHERA:
+ 	case BFD_RELOC_PPC64_TPREL16_HIGHEST:
+ 	case BFD_RELOC_PPC64_TPREL16_HIGHESTA:
+-	case BFD_RELOC_PPC64_DTPREL16_HIGH:
+-	case BFD_RELOC_PPC64_DTPREL16_HIGHA:
+ 	case BFD_RELOC_PPC64_DTPREL16_DS:
+ 	case BFD_RELOC_PPC64_DTPREL16_LO_DS:
+ 	case BFD_RELOC_PPC64_DTPREL16_HIGHER:
+@@ -6866,8 +6805,6 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
+ 	case BFD_RELOC_PPC64_HIGHER_S:
+ 	case BFD_RELOC_PPC64_HIGHEST:
+ 	case BFD_RELOC_PPC64_HIGHEST_S:
+-	case BFD_RELOC_PPC64_ADDR16_HIGH:
+-	case BFD_RELOC_PPC64_ADDR16_HIGHA:
+ 	  break;
+ 
+ 	case BFD_RELOC_PPC_DTPMOD:
+@@ -6944,14 +6881,10 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
+ 	case BFD_RELOC_PPC64_TOC16_LO:
+ 	case BFD_RELOC_PPC64_TOC16_HI:
+ 	case BFD_RELOC_PPC64_TOC16_HA:
+-	case BFD_RELOC_PPC64_DTPREL16_HIGH:
+-	case BFD_RELOC_PPC64_DTPREL16_HIGHA:
+ 	case BFD_RELOC_PPC64_DTPREL16_HIGHER:
+ 	case BFD_RELOC_PPC64_DTPREL16_HIGHERA:
+ 	case BFD_RELOC_PPC64_DTPREL16_HIGHEST:
+ 	case BFD_RELOC_PPC64_DTPREL16_HIGHESTA:
+-	case BFD_RELOC_PPC64_TPREL16_HIGH:
+-	case BFD_RELOC_PPC64_TPREL16_HIGHA:
+ 	case BFD_RELOC_PPC64_TPREL16_HIGHER:
+ 	case BFD_RELOC_PPC64_TPREL16_HIGHERA:
+ 	case BFD_RELOC_PPC64_TPREL16_HIGHEST:
+diff --git a/gold/powerpc.cc b/gold/powerpc.cc
+index 1aa4791..b8e932e 100644
+--- a/gold/powerpc.cc
++++ b/gold/powerpc.cc
+@@ -5168,8 +5168,6 @@ Target_powerpc<size, big_endian>::Scan::check_non_pic(Relobj* object,
+ 	case elfcpp::R_PPC64_JMP_IREL:
+ 	case elfcpp::R_PPC64_ADDR16_DS:
+ 	case elfcpp::R_PPC64_ADDR16_LO_DS:
+-	case elfcpp::R_PPC64_ADDR16_HIGH:
+-	case elfcpp::R_PPC64_ADDR16_HIGHA:
+ 	case elfcpp::R_PPC64_ADDR16_HIGHER:
+ 	case elfcpp::R_PPC64_ADDR16_HIGHEST:
+ 	case elfcpp::R_PPC64_ADDR16_HIGHERA:
+@@ -5178,8 +5176,6 @@ Target_powerpc<size, big_endian>::Scan::check_non_pic(Relobj* object,
+ 	case elfcpp::R_POWERPC_ADDR30:
+ 	case elfcpp::R_PPC64_TPREL16_DS:
+ 	case elfcpp::R_PPC64_TPREL16_LO_DS:
+-	case elfcpp::R_PPC64_TPREL16_HIGH:
+-	case elfcpp::R_PPC64_TPREL16_HIGHA:
+ 	case elfcpp::R_PPC64_TPREL16_HIGHER:
+ 	case elfcpp::R_PPC64_TPREL16_HIGHEST:
+ 	case elfcpp::R_PPC64_TPREL16_HIGHERA:
+@@ -5354,6 +5350,7 @@ Target_powerpc<size, big_endian>::Scan::local(
+     case elfcpp::R_POWERPC_GNU_VTINHERIT:
+     case elfcpp::R_POWERPC_GNU_VTENTRY:
+     case elfcpp::R_PPC64_TOCSAVE:
++    case elfcpp::R_PPC_EMB_MRKREF:
+     case elfcpp::R_POWERPC_TLS:
+       break;
+ 
+@@ -5391,8 +5388,6 @@ Target_powerpc<size, big_endian>::Scan::local(
+     case elfcpp::R_POWERPC_ADDR16_HI:
+     case elfcpp::R_POWERPC_ADDR16_HA:
+     case elfcpp::R_POWERPC_UADDR16:
+-    case elfcpp::R_PPC64_ADDR16_HIGH:
+-    case elfcpp::R_PPC64_ADDR16_HIGHA:
+     case elfcpp::R_PPC64_ADDR16_HIGHER:
+     case elfcpp::R_PPC64_ADDR16_HIGHERA:
+     case elfcpp::R_PPC64_ADDR16_HIGHEST:
+@@ -5451,35 +5446,31 @@ Target_powerpc<size, big_endian>::Scan::local(
+     case elfcpp::R_POWERPC_REL16_HI:
+     case elfcpp::R_POWERPC_REL16_HA:
+     case elfcpp::R_POWERPC_SECTOFF:
+-    case elfcpp::R_POWERPC_SECTOFF_LO:
+-    case elfcpp::R_POWERPC_SECTOFF_HI:
+-    case elfcpp::R_POWERPC_SECTOFF_HA:
+-    case elfcpp::R_PPC64_SECTOFF_DS:
+-    case elfcpp::R_PPC64_SECTOFF_LO_DS:
+     case elfcpp::R_POWERPC_TPREL16:
++    case elfcpp::R_POWERPC_DTPREL16:
++    case elfcpp::R_POWERPC_SECTOFF_LO:
+     case elfcpp::R_POWERPC_TPREL16_LO:
++    case elfcpp::R_POWERPC_DTPREL16_LO:
++    case elfcpp::R_POWERPC_SECTOFF_HI:
+     case elfcpp::R_POWERPC_TPREL16_HI:
++    case elfcpp::R_POWERPC_DTPREL16_HI:
++    case elfcpp::R_POWERPC_SECTOFF_HA:
+     case elfcpp::R_POWERPC_TPREL16_HA:
+-    case elfcpp::R_PPC64_TPREL16_DS:
+-    case elfcpp::R_PPC64_TPREL16_LO_DS:
+-    case elfcpp::R_PPC64_TPREL16_HIGH:
+-    case elfcpp::R_PPC64_TPREL16_HIGHA:
++    case elfcpp::R_POWERPC_DTPREL16_HA:
++    case elfcpp::R_PPC64_DTPREL16_HIGHER:
+     case elfcpp::R_PPC64_TPREL16_HIGHER:
++    case elfcpp::R_PPC64_DTPREL16_HIGHERA:
+     case elfcpp::R_PPC64_TPREL16_HIGHERA:
++    case elfcpp::R_PPC64_DTPREL16_HIGHEST:
+     case elfcpp::R_PPC64_TPREL16_HIGHEST:
++    case elfcpp::R_PPC64_DTPREL16_HIGHESTA:
+     case elfcpp::R_PPC64_TPREL16_HIGHESTA:
+-    case elfcpp::R_POWERPC_DTPREL16:
+-    case elfcpp::R_POWERPC_DTPREL16_LO:
+-    case elfcpp::R_POWERPC_DTPREL16_HI:
+-    case elfcpp::R_POWERPC_DTPREL16_HA:
++    case elfcpp::R_PPC64_TPREL16_DS:
++    case elfcpp::R_PPC64_TPREL16_LO_DS:
+     case elfcpp::R_PPC64_DTPREL16_DS:
+     case elfcpp::R_PPC64_DTPREL16_LO_DS:
+-    case elfcpp::R_PPC64_DTPREL16_HIGH:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHA:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHER:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHERA:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHEST:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHESTA:
++    case elfcpp::R_PPC64_SECTOFF_DS:
++    case elfcpp::R_PPC64_SECTOFF_LO_DS:
+     case elfcpp::R_PPC64_TLSGD:
+     case elfcpp::R_PPC64_TLSLD:
+       break;
+@@ -5713,6 +5704,7 @@ Target_powerpc<size, big_endian>::Scan::global(
+     case elfcpp::R_POWERPC_GNU_VTINHERIT:
+     case elfcpp::R_POWERPC_GNU_VTENTRY:
+     case elfcpp::R_PPC_LOCAL24PC:
++    case elfcpp::R_PPC_EMB_MRKREF:
+     case elfcpp::R_POWERPC_TLS:
+       break;
+ 
+@@ -5762,8 +5754,6 @@ Target_powerpc<size, big_endian>::Scan::global(
+     case elfcpp::R_POWERPC_ADDR16_HI:
+     case elfcpp::R_POWERPC_ADDR16_HA:
+     case elfcpp::R_POWERPC_UADDR16:
+-    case elfcpp::R_PPC64_ADDR16_HIGH:
+-    case elfcpp::R_PPC64_ADDR16_HIGHA:
+     case elfcpp::R_PPC64_ADDR16_HIGHER:
+     case elfcpp::R_PPC64_ADDR16_HIGHERA:
+     case elfcpp::R_PPC64_ADDR16_HIGHEST:
+@@ -5897,35 +5887,31 @@ Target_powerpc<size, big_endian>::Scan::global(
+     case elfcpp::R_POWERPC_REL16_HI:
+     case elfcpp::R_POWERPC_REL16_HA:
+     case elfcpp::R_POWERPC_SECTOFF:
+-    case elfcpp::R_POWERPC_SECTOFF_LO:
+-    case elfcpp::R_POWERPC_SECTOFF_HI:
+-    case elfcpp::R_POWERPC_SECTOFF_HA:
+-    case elfcpp::R_PPC64_SECTOFF_DS:
+-    case elfcpp::R_PPC64_SECTOFF_LO_DS:
+     case elfcpp::R_POWERPC_TPREL16:
++    case elfcpp::R_POWERPC_DTPREL16:
++    case elfcpp::R_POWERPC_SECTOFF_LO:
+     case elfcpp::R_POWERPC_TPREL16_LO:
++    case elfcpp::R_POWERPC_DTPREL16_LO:
++    case elfcpp::R_POWERPC_SECTOFF_HI:
+     case elfcpp::R_POWERPC_TPREL16_HI:
++    case elfcpp::R_POWERPC_DTPREL16_HI:
++    case elfcpp::R_POWERPC_SECTOFF_HA:
+     case elfcpp::R_POWERPC_TPREL16_HA:
+-    case elfcpp::R_PPC64_TPREL16_DS:
+-    case elfcpp::R_PPC64_TPREL16_LO_DS:
+-    case elfcpp::R_PPC64_TPREL16_HIGH:
+-    case elfcpp::R_PPC64_TPREL16_HIGHA:
++    case elfcpp::R_POWERPC_DTPREL16_HA:
++    case elfcpp::R_PPC64_DTPREL16_HIGHER:
+     case elfcpp::R_PPC64_TPREL16_HIGHER:
++    case elfcpp::R_PPC64_DTPREL16_HIGHERA:
+     case elfcpp::R_PPC64_TPREL16_HIGHERA:
++    case elfcpp::R_PPC64_DTPREL16_HIGHEST:
+     case elfcpp::R_PPC64_TPREL16_HIGHEST:
++    case elfcpp::R_PPC64_DTPREL16_HIGHESTA:
+     case elfcpp::R_PPC64_TPREL16_HIGHESTA:
+-    case elfcpp::R_POWERPC_DTPREL16:
+-    case elfcpp::R_POWERPC_DTPREL16_LO:
+-    case elfcpp::R_POWERPC_DTPREL16_HI:
+-    case elfcpp::R_POWERPC_DTPREL16_HA:
++    case elfcpp::R_PPC64_TPREL16_DS:
++    case elfcpp::R_PPC64_TPREL16_LO_DS:
+     case elfcpp::R_PPC64_DTPREL16_DS:
+     case elfcpp::R_PPC64_DTPREL16_LO_DS:
+-    case elfcpp::R_PPC64_DTPREL16_HIGH:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHA:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHER:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHERA:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHEST:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHESTA:
++    case elfcpp::R_PPC64_SECTOFF_DS:
++    case elfcpp::R_PPC64_SECTOFF_LO_DS:
+     case elfcpp::R_PPC64_TLSGD:
+     case elfcpp::R_PPC64_TLSLD:
+       break;
+@@ -7098,10 +7084,8 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
+ 
+     case elfcpp::R_PPC64_TPREL16_DS:
+     case elfcpp::R_PPC64_TPREL16_LO_DS:
+-    case elfcpp::R_PPC64_TPREL16_HIGH:
+-    case elfcpp::R_PPC64_TPREL16_HIGHA:
+       if (size != 64)
+-	// R_PPC_TLSGD, R_PPC_TLSLD, R_PPC_EMB_RELST_LO, R_PPC_EMB_RELST_HI
++	// R_PPC_TLSGD and R_PPC_TLSLD
+ 	break;
+     case elfcpp::R_POWERPC_TPREL16:
+     case elfcpp::R_POWERPC_TPREL16_LO:
+@@ -7131,8 +7115,6 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
+     case elfcpp::R_POWERPC_DTPREL16_HI:
+     case elfcpp::R_POWERPC_DTPREL16_HA:
+     case elfcpp::R_POWERPC_DTPREL:
+-    case elfcpp::R_PPC64_DTPREL16_HIGH:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHA:
+       // tls symbol values are relative to tls_segment()->vaddr()
+       value -= dtp_offset;
+       break;
+@@ -7273,34 +7255,6 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
+       overflow = Reloc::CHECK_BITFIELD;
+       break;
+ 
+-    case elfcpp::R_POWERPC_ADDR16_HI:
+-    case elfcpp::R_POWERPC_ADDR16_HA:
+-    case elfcpp::R_POWERPC_GOT16_HI:
+-    case elfcpp::R_POWERPC_GOT16_HA:
+-    case elfcpp::R_POWERPC_PLT16_HI:
+-    case elfcpp::R_POWERPC_PLT16_HA:
+-    case elfcpp::R_POWERPC_SECTOFF_HI:
+-    case elfcpp::R_POWERPC_SECTOFF_HA:
+-    case elfcpp::R_PPC64_TOC16_HI:
+-    case elfcpp::R_PPC64_TOC16_HA:
+-    case elfcpp::R_PPC64_PLTGOT16_HI:
+-    case elfcpp::R_PPC64_PLTGOT16_HA:
+-    case elfcpp::R_POWERPC_TPREL16_HI:
+-    case elfcpp::R_POWERPC_TPREL16_HA:
+-    case elfcpp::R_POWERPC_DTPREL16_HI:
+-    case elfcpp::R_POWERPC_DTPREL16_HA:
+-    case elfcpp::R_POWERPC_GOT_TLSGD16_HI:
+-    case elfcpp::R_POWERPC_GOT_TLSGD16_HA:
+-    case elfcpp::R_POWERPC_GOT_TLSLD16_HI:
+-    case elfcpp::R_POWERPC_GOT_TLSLD16_HA:
+-    case elfcpp::R_POWERPC_GOT_TPREL16_HI:
+-    case elfcpp::R_POWERPC_GOT_TPREL16_HA:
+-    case elfcpp::R_POWERPC_GOT_DTPREL16_HI:
+-    case elfcpp::R_POWERPC_GOT_DTPREL16_HA:
+-    case elfcpp::R_POWERPC_REL16_HI:
+-    case elfcpp::R_POWERPC_REL16_HA:
+-      if (size == 32)
+-	break;
+     case elfcpp::R_POWERPC_REL24:
+     case elfcpp::R_PPC_PLTREL24:
+     case elfcpp::R_PPC_LOCAL24PC:
+@@ -7334,6 +7288,7 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
+     case elfcpp::R_POWERPC_TLS:
+     case elfcpp::R_POWERPC_GNU_VTINHERIT:
+     case elfcpp::R_POWERPC_GNU_VTENTRY:
++    case elfcpp::R_PPC_EMB_MRKREF:
+       break;
+ 
+     case elfcpp::R_PPC64_ADDR64:
+@@ -7404,12 +7359,6 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
+       status = Reloc::addr16_u(view, value, overflow);
+       break;
+ 
+-    case elfcpp::R_PPC64_ADDR16_HIGH:
+-    case elfcpp::R_PPC64_TPREL16_HIGH:
+-    case elfcpp::R_PPC64_DTPREL16_HIGH:
+-      if (size == 32)
+-	// R_PPC_EMB_MRKREF, R_PPC_EMB_RELST_LO, R_PPC_EMB_RELST_HA
+-	goto unsupp;
+     case elfcpp::R_POWERPC_ADDR16_HI:
+     case elfcpp::R_POWERPC_REL16_HI:
+     case elfcpp::R_PPC64_TOC16_HI:
+@@ -7424,12 +7373,6 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
+       Reloc::addr16_hi(view, value);
+       break;
+ 
+-    case elfcpp::R_PPC64_ADDR16_HIGHA:
+-    case elfcpp::R_PPC64_TPREL16_HIGHA:
+-    case elfcpp::R_PPC64_DTPREL16_HIGHA:
+-      if (size == 32)
+-	// R_PPC_EMB_RELSEC16, R_PPC_EMB_RELST_HI, R_PPC_EMB_BIT_FLD
+-	goto unsupp;
+     case elfcpp::R_POWERPC_ADDR16_HA:
+     case elfcpp::R_POWERPC_REL16_HA:
+     case elfcpp::R_PPC64_TOC16_HA:
+@@ -7554,6 +7497,11 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
+     case elfcpp::R_PPC64_PLT16_LO_DS:
+     case elfcpp::R_PPC64_PLTGOT16_DS:
+     case elfcpp::R_PPC64_PLTGOT16_LO_DS:
++    case elfcpp::R_PPC_EMB_RELSEC16:
++    case elfcpp::R_PPC_EMB_RELST_LO:
++    case elfcpp::R_PPC_EMB_RELST_HI:
++    case elfcpp::R_PPC_EMB_RELST_HA:
++    case elfcpp::R_PPC_EMB_BIT_FLD:
+     case elfcpp::R_PPC_EMB_RELSDA:
+     case elfcpp::R_PPC_TOC16:
+     default:
+diff --git a/include/elf/ppc64.h b/include/elf/ppc64.h
+index 78d947b..5888460 100644
+--- a/include/elf/ppc64.h
++++ b/include/elf/ppc64.h
+@@ -141,14 +141,6 @@ START_RELOC_NUMBERS (elf_ppc64_reloc_type)
+   RELOC_NUMBER (R_PPC64_TLSLD,		   108)
+   RELOC_NUMBER (R_PPC64_TOCSAVE,	   109)
+ 
+-/* Added when HA and HI relocs were changed to report overflows.  */
+-  RELOC_NUMBER (R_PPC64_ADDR16_HIGH,	   110)
+-  RELOC_NUMBER (R_PPC64_ADDR16_HIGHA,	   111)
+-  RELOC_NUMBER (R_PPC64_TPREL16_HIGH,	   112)
+-  RELOC_NUMBER (R_PPC64_TPREL16_HIGHA,	   113)
+-  RELOC_NUMBER (R_PPC64_DTPREL16_HIGH,	   114)
+-  RELOC_NUMBER (R_PPC64_DTPREL16_HIGHA,	   115)
+-
+ #ifndef RELOC_MACROS_GEN_FUNC
+ /* Fake relocation only used internally by ld.  */
+   RELOC_NUMBER (R_PPC64_LO_DS_OPT,	   128)
+@@ -169,9 +161,8 @@ START_RELOC_NUMBERS (elf_ppc64_reloc_type)
+ 
+ END_RELOC_NUMBERS (R_PPC64_max)
+ 
+-#define IS_PPC64_TLS_RELOC(R)						\
+-  (((R) >= R_PPC64_TLS && (R) <= R_PPC64_DTPREL16_HIGHESTA)		\
+-   || ((R) >= R_PPC64_TPREL16_HIGH && (R) <= R_PPC64_DTPREL16_HIGHA))
++#define IS_PPC64_TLS_RELOC(R) \
++  ((R) >= R_PPC64_TLS && (R) <= R_PPC64_DTPREL16_HIGHESTA)
+ 
+ 
+ /* e_flags bits specifying ABI.
+-- 
+1.7.9.5
+
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-15  2:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-09 14:55 Build kernel error for B4860qds-64b machine Alexandru Vaduva
2014-04-10  2:58 ` Kernel Configure Morgan McKenzie
2014-04-10  8:35   ` Erik Botö
2014-04-10  4:06 ` Build kernel error for B4860qds-64b machine ting.liu
2014-04-10  8:07   ` Alexandru Vaduva
2014-04-15  2:31     ` ting.liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.