[PATCH v2] h8300-elf: ld: Use USER_LABEL_PREFIX when generating linker scripts
Jan Dubiec <[email protected]>
| Newsgroups | gmane.comp.gnu.binutils |
|---|---|
| Message-ID | <[email protected]> |
This version does not explicitly set the entry symbol; the default one is used instead. The corresponding newlib patch will follow shortly. Signed-off-by: Jan Dubiec <[email protected]> --- ld/emulparams/h8300elf.sh | 1 + ld/testsuite/ld-h8300/gcsection.d | 2 +- ld/testsuite/ld-h8300/gcsection.s | 6 +++--- ld/testsuite/ld-h8300/relax-2.d | 2 +- ld/testsuite/ld-h8300/relax-2.s | 4 ++-- ld/testsuite/ld-h8300/relax-3.d | 2 +- ld/testsuite/ld-h8300/relax-3.s | 4 ++-- ld/testsuite/ld-h8300/relax-4.d | 2 +- ld/testsuite/ld-h8300/relax-4.s | 4 ++-- ld/testsuite/ld-h8300/relax-5.d | 2 +- ld/testsuite/ld-h8300/relax-5.s | 4 ++-- ld/testsuite/ld-h8300/relax-6.d | 2 +- ld/testsuite/ld-h8300/relax-6.s | 4 ++-- ld/testsuite/ld-h8300/relax-7.d | 2 +- ld/testsuite/ld-h8300/relax-7a.s | 4 ++-- ld/testsuite/ld-h8300/relax.d | 2 +- ld/testsuite/ld-h8300/relax.s | 4 ++-- sim/testsuite/h8300/testutils.inc | 4 ++-- 18 files changed, 28 insertions(+), 27 deletions(-) diff --git a/ld/emulparams/h8300elf.sh b/ld/emulparams/h8300elf.sh index 45b3458d1ce..dd007fcd0ff 100644 --- a/ld/emulparams/h8300elf.sh +++ b/ld/emulparams/h8300elf.sh @@ -9,6 +9,7 @@ MAXPAGESIZE=2 TARGET_PAGE_SIZE=128 ARCH=h8300 TEMPLATE_NAME=elf +USER_LABEL_PREFIX=_ EMBEDDED=yes STACK_ADDR=0xfefc TINY_READONLY_SECTION=".tinyrodata : diff --git a/ld/testsuite/ld-h8300/gcsection.d b/ld/testsuite/ld-h8300/gcsection.d index acf39be8d7f..af52552fb3a 100644 --- a/ld/testsuite/ld-h8300/gcsection.d +++ b/ld/testsuite/ld-h8300/gcsection.d @@ -17,7 +17,7 @@ Disassembly of section .text: 114: mov.l @er7\+,er6 118: rts -0000011a <_start>: +0000011a <__start>: 11a: mov.l er6,@-er7 11e: mov.l er7,er6 120: mov.w #0x4b,r0 diff --git a/ld/testsuite/ld-h8300/gcsection.s b/ld/testsuite/ld-h8300/gcsection.s index 2149ee99cb4..29eccfeb02f 100644 --- a/ld/testsuite/ld-h8300/gcsection.s +++ b/ld/testsuite/ld-h8300/gcsection.s @@ -29,8 +29,8 @@ _functionWeDontUse: .size _functionWeDontUse, .-_functionWeDontUse .section .text.start,"ax",@progbits .align 1 - .global _start -_start: + .global __start +__start: mov.l er6,@-er7 mov.l er7,er6 mov.w #75,r0 @@ -39,5 +39,5 @@ _start: mov.w r2,r0 mov.l @er7+,er6 rts - .size _start, .-_start + .size __start, .-__start .end diff --git a/ld/testsuite/ld-h8300/relax-2.d b/ld/testsuite/ld-h8300/relax-2.d index 7e7964b5c81..fb40a9569fe 100644 --- a/ld/testsuite/ld-h8300/relax-2.d +++ b/ld/testsuite/ld-h8300/relax-2.d @@ -6,7 +6,7 @@ Disassembly of section .text: -00000100 <_start>: +00000100 <__start>: 100: mov.b @0x64:8,r0l 102: mov.b r0l,@0x64:8 104: mov.b @0x4320:16,r0l diff --git a/ld/testsuite/ld-h8300/relax-2.s b/ld/testsuite/ld-h8300/relax-2.s index 8e096b83863..5d02ce3b801 100644 --- a/ld/testsuite/ld-h8300/relax-2.s +++ b/ld/testsuite/ld-h8300/relax-2.s @@ -1,6 +1,6 @@ .h8300h - .globl _start -_start: + .globl __start +__start: mov.b @foo:16,r0l mov.b r0l,@foo:16 mov.b @bar:32,r0l diff --git a/ld/testsuite/ld-h8300/relax-3.d b/ld/testsuite/ld-h8300/relax-3.d index f5a9390b785..35c88ee55c2 100644 --- a/ld/testsuite/ld-h8300/relax-3.d +++ b/ld/testsuite/ld-h8300/relax-3.d @@ -6,7 +6,7 @@ Disassembly of section .text: -00000100 <_start>: +00000100 <__start>: # # Relaxation of aa:16 # diff --git a/ld/testsuite/ld-h8300/relax-3.s b/ld/testsuite/ld-h8300/relax-3.s index f4a2346ab9c..84d0934e1b7 100644 --- a/ld/testsuite/ld-h8300/relax-3.s +++ b/ld/testsuite/ld-h8300/relax-3.s @@ -1,6 +1,6 @@ .h8300s - .globl _start -_start: + .globl __start +__start: # s3-s6 aren't valid 16-bit addresses. mov.b @s1:16,r0l mov.b @s2:16,r0l diff --git a/ld/testsuite/ld-h8300/relax-4.d b/ld/testsuite/ld-h8300/relax-4.d index ee80bc39644..a6e040f1130 100644 --- a/ld/testsuite/ld-h8300/relax-4.d +++ b/ld/testsuite/ld-h8300/relax-4.d @@ -6,7 +6,7 @@ Disassembly of section .text: -00000100 <_start>: +00000100 <__start>: 100: mov.b #0x3,r0l 102: mov.b #0x5,r2l 104: bset r0l,@0xff:8 diff --git a/ld/testsuite/ld-h8300/relax-4.s b/ld/testsuite/ld-h8300/relax-4.s index 7d6296da230..29aad35d4a8 100644 --- a/ld/testsuite/ld-h8300/relax-4.s +++ b/ld/testsuite/ld-h8300/relax-4.s @@ -1,8 +1,8 @@ ; Relaxation is possible for following bit manipulation instructions ; BAND, BCLR, BIAND, BILD, BIOR, BIST, BIXOR, BLD, BNOT, BOR, BSET, BST, BTST, BXOR .h8300s - .globl _start -_start: + .globl __start +__start: # s3-s6 aren't valid 16-bit addresses. mov.b #0x3,r0l mov.b #0x5,r2l diff --git a/ld/testsuite/ld-h8300/relax-5.d b/ld/testsuite/ld-h8300/relax-5.d index 00c4fa89ee4..b678fec1f86 100644 --- a/ld/testsuite/ld-h8300/relax-5.d +++ b/ld/testsuite/ld-h8300/relax-5.d @@ -7,7 +7,7 @@ Disassembly of section .text: -00000100 <_start>: +00000100 <__start>: 100: ldc @0x0:16,ccr 106: ldc @0x7fff:16,ccr 10c: ldc @0x8000:32,ccr diff --git a/ld/testsuite/ld-h8300/relax-5.s b/ld/testsuite/ld-h8300/relax-5.s index b5afedbfcca..6264c6d5848 100644 --- a/ld/testsuite/ld-h8300/relax-5.s +++ b/ld/testsuite/ld-h8300/relax-5.s @@ -4,11 +4,11 @@ ; ldc.w @aa:32,exr ; stc.w exr,@aa:32 .h8300s - .globl _start + .globl __start ; ; Relaxation of aa:32 ; - _start: + __start: ldc @s1:32,ccr ldc @s2:32,ccr ldc @s3:32,ccr diff --git a/ld/testsuite/ld-h8300/relax-6.d b/ld/testsuite/ld-h8300/relax-6.d index 54853ef6dbc..17eeed14932 100644 --- a/ld/testsuite/ld-h8300/relax-6.d +++ b/ld/testsuite/ld-h8300/relax-6.d @@ -6,6 +6,6 @@ .*: file format .* Disassembly of section .text: -00000100 <_start>: +00000100 <__start>: 100: mov.b r2l,@0xbd:8 102: rts diff --git a/ld/testsuite/ld-h8300/relax-6.s b/ld/testsuite/ld-h8300/relax-6.s index fb44b54cb1d..abf7cdcd42a 100644 --- a/ld/testsuite/ld-h8300/relax-6.s +++ b/ld/testsuite/ld-h8300/relax-6.s @@ -1,5 +1,5 @@ .h8300s - .global _start -_start: + .global __start +__start: mov.b r2l,@0xFFFFFFBD:32 rts diff --git a/ld/testsuite/ld-h8300/relax-7.d b/ld/testsuite/ld-h8300/relax-7.d index f45787c75ce..c3e0846721e 100644 --- a/ld/testsuite/ld-h8300/relax-7.d +++ b/ld/testsuite/ld-h8300/relax-7.d @@ -27,7 +27,7 @@ Contents of section .rodata: Disassembly of section .text: -00000100 <_start>: +00000100 <__start>: 100: sub.l er0,er0 102: sub.l er2,er2 104: mov.l #0xffff8000,er1 diff --git a/ld/testsuite/ld-h8300/relax-7a.s b/ld/testsuite/ld-h8300/relax-7a.s index 915fb79caed..fa0a4b08917 100644 --- a/ld/testsuite/ld-h8300/relax-7a.s +++ b/ld/testsuite/ld-h8300/relax-7a.s @@ -1,9 +1,9 @@ .h8300s # relax expected - .global _start + .global __start .section .text.func1,"ax",@progbits .align 1 -_start: +__start: sub.l er0,er0 sub.l er2,er2 mov.l #var3,er1 diff --git a/ld/testsuite/ld-h8300/relax.d b/ld/testsuite/ld-h8300/relax.d index fb863586bfb..90e3b650d99 100644 --- a/ld/testsuite/ld-h8300/relax.d +++ b/ld/testsuite/ld-h8300/relax.d @@ -9,7 +9,7 @@ Disassembly of section .text: -00000100 <_start>: +00000100 <__start>: 100: 0d 00.*mov.w r0,r0 102: 47 02.*beq .+2 \(0x106\) 104: 55 02.*bsr .+2 \(0x108\) diff --git a/ld/testsuite/ld-h8300/relax.s b/ld/testsuite/ld-h8300/relax.s index b06f3a921c6..c47943dfacf 100644 --- a/ld/testsuite/ld-h8300/relax.s +++ b/ld/testsuite/ld-h8300/relax.s @@ -1,6 +1,6 @@ .text - .global _start -_start: + .global __start +__start: mov.w r0,r0 beq .L1 jsr @_bar diff --git a/sim/testsuite/h8300/testutils.inc b/sim/testsuite/h8300/testutils.inc index 63d27d45c14..7676ff58c58 100644 --- a/sim/testsuite/h8300/testutils.inc +++ b/sim/testsuite/h8300/testutils.inc @@ -20,8 +20,8 @@ .text .align 2 - .global _start -_start: + .global __start +__start: jmp _main .data -- 2.55.0