[Bug target/81907] undefined reference to `memset'

dongkyun.s at samsung dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 21 08:42:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81907

dongkyun.s at samsung dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #42014|0                           |1
        is obsolete|                            |

--- Comment #5 from dongkyun.s at samsung dot com ---
Created attachment 42016
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42016&action=edit
obj made by '-Os -mtune=cortex-a9'

./gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-objdump
-d memset_test_cortex-a9.o

memset_test_cortex-a9.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <func1>:
   0:   b530            push    {r4, r5, lr}
   2:   f1a0 0208       sub.w   r2, r0, #8
   6:   460c            mov     r4, r1
   8:   2300            movs    r3, #0
   a:   2000            movs    r0, #0
   c:   2100            movs    r1, #0
   e:   42a3            cmp     r3, r4
  10:   db00            blt.n   14 <func1+0x14>
  12:   bd30            pop     {r4, r5, pc}
  14:   f852 5f08       ldr.w   r5, [r2, #8]!
  18:   3301            adds    r3, #1
  1a:   1940            adds    r0, r0, r5
  1c:   eb41 71e5       adc.w   r1, r1, r5, asr #31
  20:   e7f5            b.n     e <func1+0xe>

00000022 <test_func>:
  22:   b51f            push    {r0, r1, r2, r3, r4, lr}
  24:   2210            movs    r2, #16
  26:   2100            movs    r1, #0
  28:   4668            mov     r0, sp
  2a:   f7ff fffe       bl      0 <memset>
  2e:   490a            ldr     r1, [pc, #40]   ; (58 <test_func+0x36>)
  30:   2200            movs    r2, #0
  32:   780c            ldrb    r4, [r1, #0]
  34:   7908            ldrb    r0, [r1, #4]
  36:   4623            mov     r3, r4
  38:   4302            orrs    r2, r0
  3a:   4668            mov     r0, sp
  3c:   e9cd 2300       strd    r2, r3, [sp]
  40:   2300            movs    r3, #0
  42:   788a            ldrb    r2, [r1, #2]
  44:   f043 0307       orr.w   r3, r3, #7
  48:   2102            movs    r1, #2
  4a:   e9cd 2302       strd    r2, r3, [sp, #8]
  4e:   f7ff fffe       bl      0 <func1>
  52:   b004            add     sp, #16
  54:   bd10            pop     {r4, pc}
  56:   bf00            nop
  58:   00000000        .word   0x00000000


More information about the Gcc-bugs mailing list