This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using S_SET_VOLATILE in md_undefined_symbol crashes as


Hi HoraK,

> The problem is I have a source file where all registers for the EZ-USB FX2LP are listed and some of them are also defined within the 8051 patch now if as reaches such an symbol it throws an error "symbol ... is already defined"

How are the symbols being defined ?

It may be possible for you to override the way the definition is
parsed and allow the redefinition to occur.

Also - are the register name definitions in the source file necessary ?  
One trick used by some ports is to add a prefix to register names, one
that would not occur in ordinary code, such as $ or % or __ .  This 
allows user code to create symbols that look like register names, (eg 
r1, r2), but which are not the real register names (%r1, %r2) and so 
the redefinition error does not occur.

Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]