bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/18541] New: ARM: adr reference to global symbol fails to assemb


From: ard.biesheuvel at linaro dot org
Subject: [Bug gas/18541] New: ARM: adr reference to global symbol fails to assemble in Thumb mode
Date: Mon, 15 Jun 2015 22:24:23 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18541

            Bug ID: 18541
           Summary: ARM: adr reference to global symbol fails to assemble
                    in Thumb mode
           Product: binutils
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: ard.biesheuvel at linaro dot org
  Target Milestone: ---

The following ARM code fails to assemble in Thumb mode

"""
    adr r0, cp15_save_power

    .align
    .globl cp15_save_power
cp15_save_power:
    .long 0 @ cp15 power control
"""

$ arm-linux-gnueabihf-as -o /tmp/sleep.o /tmp/sleep.S -mthumb
/tmp/sleep.S: Assembler messages:
/tmp/sleep.S:1: Error: invalid immediate for address calculation
(value = 0x00000004)

The error goes away when I drop the -mthumb or when I replace the code with
"""
    adr r0, 0f

    .align
    .globl cp15_save_power
cp15_save_power:
0:  .long 0 @ cp15 power control
"""

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]