From: Nick Clifton <nickc@redhat.com>
To: "J.W. Jagersma" <jwjagersma@gmail.com>, binutils@sourceware.org
Cc: juan.guerrero@gmx.de, dj@delorie.com
Subject: Re: [PATCH 2/2] coff-go32: support extended relocations
Date: Thu, 9 Apr 2020 10:49:53 +0100 [thread overview]
Message-ID: <d98bd431-b8b0-43e8-b00f-28a5560524ee@redhat.com> (raw)
In-Reply-To: <20200408152104.891-3-jwjagersma@gmail.com>
Hi Jan,
> coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out): Allow
> overriding these functions with macros of the same name.
[...]
> +#ifndef coff_swap_scnhdr_in
> static void
> coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
This breaks build any other COFF based target. They all define coff_swap_scnhdr_in
and coff_swap_scnhdr_out to be target specific names, but they use the generic code.
Eg bfd/alpha-coff.c (lines 86 and 87):
#define coff_swap_scnhdr_in alpha_ecoff_swap_scnhdr_in
#define coff_swap_scnhdr_out alpha_ecoff_swap_scnhdr_out
I believe that this is done so that if the binutils are configured to support multiple
coff targets they will each have their own versions of the coff_swap_scnhdr_[in|out]
functions. (Which makes sense given that the functions use macros which can be target
specific).
I think that what you need to do is to change these defines (in coff-go32.c and coff-stgo32.c):
#define coff_swap_scnhdr_in _bfd_go32_swap_scnhdr_in
#define coff_swap_scnhdr_out _bfd_go32_swap_scnhdr_out
to:
#define coff_SWAP_scnhdr_in _bfd_go32_swap_scnhdr_in
#define coff_SWAP_scnhdr_out _bfd_go32_swap_scnhdr_out
which will then ensure that the correct routines are referenced in the bfd_coff_std_swap_table
defined in coffcode.h.
Please could you check this and make sure that it does work ?
Secondly, once that is done, please could you check that a toolchain configured as:
--enable-targets=all
will build ? That way you can be sure that the alpha and mips coff targets also work.
Cheers
Nick
next prev parent reply other threads:[~2020-04-09 9:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 15:21 [PATCH 0/2] djgpp patches J.W. Jagersma
2020-04-08 15:21 ` [PATCH 1/2] coff-go32: update ldscript J.W. Jagersma
2020-04-08 15:21 ` [PATCH 2/2] coff-go32: support extended relocations J.W. Jagersma
2020-04-08 15:33 ` J.W. Jagersma
2020-04-09 9:49 ` Nick Clifton [this message]
2020-04-09 16:39 ` J.W. Jagersma
2020-04-11 15:48 ` [PATCH v2 " J.W. Jagersma
2020-04-14 16:31 ` Nick Clifton
2020-04-15 18:06 ` J.W. Jagersma
2020-04-17 12:13 ` Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d98bd431-b8b0-43e8-b00f-28a5560524ee@redhat.com \
--to=nickc@redhat.com \
--cc=binutils@sourceware.org \
--cc=dj@delorie.com \
--cc=juan.guerrero@gmx.de \
--cc=jwjagersma@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).