xtensa: fix libgcc build with --text-section-literals
diff mbox

Message ID 1455669336-1279-1-git-send-email-jcmvbkbc@gmail.com
State New
Headers show

Commit Message

Max Filippov Feb. 17, 2016, 12:35 a.m. UTC
Functions __muldf3_aux, __divdf3_aux, __mulsf3_aux and __divsf3_aux
don't start with leaf_entry, so they need explicit .literal_position,
otherwise libgcc build fails in the presence of --text-section-literals.

2016-02-17  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
	* config/xtensa/ieee754-df.S (__muldf3_aux, __divdf3_aux): Add
	.literal_position before the function.
	* config/xtensa/ieee754-sf.S (__mulsf3_aux, __divsf3_aux):
	Likewise.
---
 libgcc/config/xtensa/ieee754-df.S | 2 ++
 libgcc/config/xtensa/ieee754-sf.S | 2 ++
 2 files changed, 4 insertions(+)

Comments

augustine.sterling@gmail.com Feb. 17, 2016, 7:59 p.m. UTC | #1
On Tue, Feb 16, 2016 at 4:35 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> Functions __muldf3_aux, __divdf3_aux, __mulsf3_aux and __divsf3_aux
> don't start with leaf_entry, so they need explicit .literal_position,
> otherwise libgcc build fails in the presence of --text-section-literals.
>
> 2016-02-17  Max Filippov  <jcmvbkbc@gmail.com>
> libgcc/
>         * config/xtensa/ieee754-df.S (__muldf3_aux, __divdf3_aux): Add
>         .literal_position before the function.
>         * config/xtensa/ieee754-sf.S (__mulsf3_aux, __divsf3_aux):
>         Likewise.

This is OK, please submit.
Max Filippov Feb. 17, 2016, 8:24 p.m. UTC | #2
On Wed, Feb 17, 2016 at 10:59 PM, augustine.sterling@gmail.com
<augustine.sterling@gmail.com> wrote:
> On Tue, Feb 16, 2016 at 4:35 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Functions __muldf3_aux, __divdf3_aux, __mulsf3_aux and __divsf3_aux
>> don't start with leaf_entry, so they need explicit .literal_position,
>> otherwise libgcc build fails in the presence of --text-section-literals.
>>
>> 2016-02-17  Max Filippov  <jcmvbkbc@gmail.com>
>> libgcc/
>>         * config/xtensa/ieee754-df.S (__muldf3_aux, __divdf3_aux): Add
>>         .literal_position before the function.
>>         * config/xtensa/ieee754-sf.S (__mulsf3_aux, __divsf3_aux):
>>         Likewise.
>
> This is OK, please submit.

Applied to trunk. Thank you!

-- Max

Patch
diff mbox

diff --git a/libgcc/config/xtensa/ieee754-df.S b/libgcc/config/xtensa/ieee754-df.S
index 743dbf2..1d9ef46 100644
--- a/libgcc/config/xtensa/ieee754-df.S
+++ b/libgcc/config/xtensa/ieee754-df.S
@@ -606,6 +606,7 @@  __subdf3:
 #define XCHAL_NO_MUL 1
 #endif
 
+	.literal_position
 __muldf3_aux:
 
 	/* Handle unusual cases (zeros, subnormals, NaNs and Infinities).
@@ -1216,6 +1217,7 @@  __muldf3:
 
 #ifdef L_divdf3
 
+	.literal_position
 	/* Division */
 __divdf3_aux:
 
diff --git a/libgcc/config/xtensa/ieee754-sf.S b/libgcc/config/xtensa/ieee754-sf.S
index 1843749..7864a74 100644
--- a/libgcc/config/xtensa/ieee754-sf.S
+++ b/libgcc/config/xtensa/ieee754-sf.S
@@ -487,6 +487,7 @@  __subsf3:
 #define XCHAL_NO_MUL 1
 #endif
 
+	.literal_position
 __mulsf3_aux:
 
 	/* Handle unusual cases (zeros, subnormals, NaNs and Infinities).
@@ -884,6 +885,7 @@  __mulsf3:
 
 #ifdef L_divsf3
 
+	.literal_position
 	/* Division */
 __divsf3_aux: