public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] ld/emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for relocating operation.
@ 2015-03-27  6:43 Chen Gang
  2015-03-31 19:22 ` Chen Gang
  0 siblings, 1 reply; 4+ messages in thread
From: Chen Gang @ 2015-03-27  6:43 UTC (permalink / raw)
  To: binutils

It will cause multiple definitions for _HEAP_START, _HEAP_MAX, and
_STACK_START (e.g. build linux kernel).

2015-03-27  Chen Gang  <gang.chen.5i5j@gmail.com>

	* emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for
	relocating operation.
---
 ld/ChangeLog                    | 5 +++++
 ld/emulparams/elf32_tic6x_le.sh | 9 +++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 3a5edf2..587e2be 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-27  Chen Gang  <gang.chen.5i5j@gmail.com>
+
+	* emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for
+	relocating operation.
+
 2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
 
 	* emultempl/aarch64elf.em (_aarch64_add_stub_section): Set section
diff --git a/ld/emulparams/elf32_tic6x_le.sh b/ld/emulparams/elf32_tic6x_le.sh
index dfd64c1..6533c7f 100644
--- a/ld/emulparams/elf32_tic6x_le.sh
+++ b/ld/emulparams/elf32_tic6x_le.sh
@@ -44,7 +44,11 @@ OTHER_READWRITE_SECTIONS=".fardata ${RELOCATING-0} : { *(.fardata${RELOCATING+ .
 OTHER_READWRITE_RELOC_SECTIONS="
   .rel.fardata     ${RELOCATING-0} : { *(.rel.fardata${RELOCATING+ .rel.fardata.*}) }
   .rela.fardata    ${RELOCATING-0} : { *(.rela.fardata${RELOCATING+ .rela.fardata.*}) }"
-case ${target} in
+# For relocating operation, skip OTHER_BSS_SECTIONS, or will cause multiple definition.
+if [ ${RELOCATING-0} ]; then
+  OTHER_BSS_SECTIONS="";
+else
+  case ${target} in
     *-elf)
 	OTHER_BSS_SECTIONS="
   .heap :
@@ -60,5 +64,6 @@ case ${target} in
     _STACK_START = .;
   }"
 	;;
-esac
+  esac
+fi
 ATTRS_SECTIONS='.c6xabi.attributes 0 : { KEEP (*(.c6xabi.attributes)) KEEP (*(.gnu.attributes)) }'
-- 
1.9.3

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

* Re: [PATCH v2] ld/emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for relocating operation.
  2015-03-27  6:43 [PATCH v2] ld/emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for relocating operation Chen Gang
@ 2015-03-31 19:22 ` Chen Gang
  2015-04-01 10:32   ` Nicholas Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Chen Gang @ 2015-03-31 19:22 UTC (permalink / raw)
  To: binutils, Bernd Schmidt

Hello Maintainers:

Please help check this patch when you have time.

Thanks.

On 3/27/15 14:43, Chen Gang wrote:
> It will cause multiple definitions for _HEAP_START, _HEAP_MAX, and
> _STACK_START (e.g. build linux kernel).
> 
> 2015-03-27  Chen Gang  <gang.chen.5i5j@gmail.com>
> 
> 	* emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for
> 	relocating operation.
> ---
>  ld/ChangeLog                    | 5 +++++
>  ld/emulparams/elf32_tic6x_le.sh | 9 +++++++--
>  2 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/ld/ChangeLog b/ld/ChangeLog
> index 3a5edf2..587e2be 100644
> --- a/ld/ChangeLog
> +++ b/ld/ChangeLog
> @@ -1,3 +1,8 @@
> +2015-03-27  Chen Gang  <gang.chen.5i5j@gmail.com>
> +
> +	* emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for
> +	relocating operation.
> +
>  2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
>  
>  	* emultempl/aarch64elf.em (_aarch64_add_stub_section): Set section
> diff --git a/ld/emulparams/elf32_tic6x_le.sh b/ld/emulparams/elf32_tic6x_le.sh
> index dfd64c1..6533c7f 100644
> --- a/ld/emulparams/elf32_tic6x_le.sh
> +++ b/ld/emulparams/elf32_tic6x_le.sh
> @@ -44,7 +44,11 @@ OTHER_READWRITE_SECTIONS=".fardata ${RELOCATING-0} : { *(.fardata${RELOCATING+ .
>  OTHER_READWRITE_RELOC_SECTIONS="
>    .rel.fardata     ${RELOCATING-0} : { *(.rel.fardata${RELOCATING+ .rel.fardata.*}) }
>    .rela.fardata    ${RELOCATING-0} : { *(.rela.fardata${RELOCATING+ .rela.fardata.*}) }"
> -case ${target} in
> +# For relocating operation, skip OTHER_BSS_SECTIONS, or will cause multiple definition.
> +if [ ${RELOCATING-0} ]; then
> +  OTHER_BSS_SECTIONS="";
> +else
> +  case ${target} in
>      *-elf)
>  	OTHER_BSS_SECTIONS="
>    .heap :
> @@ -60,5 +64,6 @@ case ${target} in
>      _STACK_START = .;
>    }"
>  	;;
> -esac
> +  esac
> +fi
>  ATTRS_SECTIONS='.c6xabi.attributes 0 : { KEEP (*(.c6xabi.attributes)) KEEP (*(.gnu.attributes)) }'
> 

-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

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

* Re: [PATCH v2] ld/emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for relocating operation.
  2015-03-31 19:22 ` Chen Gang
@ 2015-04-01 10:32   ` Nicholas Clifton
  2015-04-01 13:19     ` Chen Gang
  0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Clifton @ 2015-04-01 10:32 UTC (permalink / raw)
  To: Chen Gang, binutils, Bernd Schmidt

Hi Chen,

> Please help check this patch when you have time.

>> 2015-03-27  Chen Gang  <gang.chen.5i5j@gmail.com>
>>
>> 	* emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for
>> 	relocating operation.

Approved and applied.  Sorry for the delay in reviewing.

Cheers
   Nick

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

* Re: [PATCH v2] ld/emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for relocating operation.
  2015-04-01 10:32   ` Nicholas Clifton
@ 2015-04-01 13:19     ` Chen Gang
  0 siblings, 0 replies; 4+ messages in thread
From: Chen Gang @ 2015-04-01 13:19 UTC (permalink / raw)
  To: Nicholas Clifton, binutils, Bernd Schmidt

On 4/1/15 18:32, Nicholas Clifton wrote:
> Hi Chen,
> 
>> Please help check this patch when you have time.
> 
>>> 2015-03-27  Chen Gang  <gang.chen.5i5j@gmail.com>
>>>
>>>     * emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for
>>>     relocating operation.
> 
> Approved and applied.  Sorry for the delay in reviewing.
> 

OK, thanks, next, I should send patch in time: try to send patch within
201?-??-20, and try to send patch v2 within 201?-??-25.


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

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

end of thread, other threads:[~2015-04-01 13:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-27  6:43 [PATCH v2] ld/emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for relocating operation Chen Gang
2015-03-31 19:22 ` Chen Gang
2015-04-01 10:32   ` Nicholas Clifton
2015-04-01 13:19     ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).