[Top][All Lists]

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

[Bug binutils/13503] New: [avr] Support RELOCs to represent a byte

From: gjl at gcc dot gnu.org
Subject: [Bug binutils/13503] New: [avr] Support RELOCs to represent a byte
Date: Thu, 15 Dec 2011 16:14:56 +0000


             Bug #: 13503
           Summary: [avr] Support RELOCs to represent a byte
           Product: binutils
           Version: 2.23 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: address@hidden
        ReportedBy: address@hidden
                CC: address@hidden
    Classification: Unclassified
            Target: avr

Suppose the following C code from avr-gcc 4.7:

extern const __pgmx char foo;
const __pgmx void * pointer = &foo;

Notice that __pgmx is not a macro but a new built-in keyword for a named
address space that can hold 24-bit pointers.

The code from above tries to assembler the address of foo.
However, there is *no* way to do that in binutils because the recprective
RELOCs like hh8 are not allowed in places they are needed:

.global    pointer
    .type    pointer, @object
    .size    pointer, 3
    .word    foo
    .warning    "assembling 24-bit address needs binutils extension for
    .byte    0     ;  hh8(foo)

avr-gcc emits a "0" to work around that but the code of not correct as the high
part of the address will always be 0.

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]