arc fixup bug

Nick Clifton nickc@redhat.com
Wed Jan 17 15:04:00 GMT 2001


Hi Peter,

: Since the new updates for arc-elf32 I cannot assemble code like
: (generated during gcc build):
: 
:           st   .L11@h30,[r12,4]
:      .L11:
: 
: The assembler complains that this is an "invalid section for
: operation".
:
: Any clues about how I can figure out whats going on would be

OK - this message is occurring because resolve_symbol_value() is being
called to compute the expression that was generated for for the
".L11@h30" input.

The "@h30" input causes arc_code_symbol() to be called to generate an
expression which means "right-shift-by-two".  This expression has a
fake symbol created for it (called .L0^A) and since the expression is
constant it is placed in the absolute section.

Unfortunately .L11 is in the .text section, so when ".L11@h30" is
computed the code finds that the two symbols are in different
sections.

The simple solution would appear to be to not use expressions for the
"@h30" syntax, but use a unique reloc value in the fixup instead, and
then process this value at the end of md_assembler, or in
md_apply_fix, whichever is more appropriate.

Cheers
	Nick


More information about the Binutils mailing list