This is the mail archive of the
mailing list for the binutils project.
Re: Using S_SET_VOLATILE in md_undefined_symbol crashes as
- From: Nick Clifton <nickc at redhat dot com>
- To: HoraK-FDF <horak-fdf at yandex dot com>, binutils at sourceware dot org
- Date: Tue, 8 Aug 2017 10:38:12 +0100
- Subject: Re: Using S_SET_VOLATILE in md_undefined_symbol crashes as
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=nickc at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CAAC08553D
- References: <email@example.com>
> 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.