This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: A patch to fix COFF
On Fri, Feb 23, 2001 at 11:32:45AM -0800, Nick Clifton wrote:
> Hi H.J.
>
> > 2001-02-22 H.J. Lu <hjl@gnu.org>
> >
> > * dwarf2dbg.c (dwarf2_directive_file): Call s_app_file if
> > BFD_ASSEMBLER is not defined.
>
> No, I think that this is wrong. If a port is not supporting DWRAF2
> debug generation then it should not have the "file" and "loc"
> directives in its pseudo table. We should not just work around the
> problem in the port, which I feel is what this patch is doing.
>
> Instead, why not just fix the SH port like this:
>
> What do you think ?
>
It was my first thought. But I was too lazy to chanage all
config/tc-alpha.c
config/tc-arm.c
config/tc-cris.c
config/tc-hppa.c
config/tc-i386.c
config/tc-ia64.c
config/tc-m68hc11.c
config/tc-mn10300.c
config/tc-ppc.c
config/tc-sh.c
config/tc-sparc.c
config/tc-v850.c
If you want to go this way, please check all of them and make sure
they are all ok. I know config/tc-i386.c is not. If you believe it is
the right approach, shouldn't the definitions of dwarf2_directive_loc,
dwarf2_directive_file, ... be removed if BFD_ASSEMBLER is not defined?
You will get a link-time error instead of a run-time error.
Thanks.
H.J.