From: "J.W. Jagersma" <jwjagersma@gmail.com>
To: binutils@sourceware.org
Cc: dj@delorie.com, stsp@users.sourceforge.net,
"J.W. Jagersma" <jwjagersma@gmail.com>
Subject: [PATCH 3/3] normalize names in coff-stgo32.c
Date: Thu, 19 Mar 2020 20:19:23 +0100 [thread overview]
Message-ID: <20200319191923.34747-4-jwjagersma@gmail.com> (raw)
In-Reply-To: <20200319191923.34747-1-jwjagersma@gmail.com>
This patch cleans up coff-stgo32.c by changing all names so that they
begin with "go32exe_". There are no functional changes.
bfd/
2020-03-19 Jan W. Jagersma <jwjagersma@gmail.com>
* coff-stgo32.c (go32_check_format): Rename to...
(go32exe_check_format): ...this.
(go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to...
(go32exe_copy_private_bfd_data): ...this.
(stub_bytes): Rename to...
(go32exe_default_stub): ...this.
(create_go32_stub): Rename to...
(go32exe_create_stub): ...this.
---
bfd/coff-stgo32.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/bfd/coff-stgo32.c b/bfd/coff-stgo32.c
index c24785ea2c..7239b34306 100644
--- a/bfd/coff-stgo32.c
+++ b/bfd/coff-stgo32.c
@@ -50,15 +50,15 @@
#include "bfd.h"
#include "coff/msdos.h"
-static bfd_cleanup go32_check_format (bfd *);
+static bfd_cleanup go32exe_check_format (bfd *);
static bfd_boolean go32exe_write_object_contents (bfd *);
static bfd_boolean go32exe_mkobject (bfd *);
-static bfd_boolean go32_stubbed_coff_bfd_copy_private_bfd_data (bfd *, bfd *);
+static bfd_boolean go32exe_copy_private_bfd_data (bfd *, bfd *);
-#define COFF_CHECK_FORMAT go32_check_format
+#define COFF_CHECK_FORMAT go32exe_check_format
#define COFF_WRITE_CONTENTS go32exe_write_object_contents
#define coff_mkobject go32exe_mkobject
-#define coff_bfd_copy_private_bfd_data go32_stubbed_coff_bfd_copy_private_bfd_data
+#define coff_bfd_copy_private_bfd_data go32exe_copy_private_bfd_data
#include "coff-i386.c"
@@ -69,7 +69,7 @@ static bfd_boolean go32_stubbed_coff_bfd_copy_private_bfd_data (bfd *, bfd *);
/* These bytes are a 2048-byte DOS executable, which loads the COFF
image into memory and then runs it. It is called 'stub'. */
#define GO32EXE_DEFAULT_STUB_SIZE 2048
-static const unsigned char stub_bytes[GO32EXE_DEFAULT_STUB_SIZE] =
+static const unsigned char go32exe_default_stub[GO32EXE_DEFAULT_STUB_SIZE] =
{
#include "go32stub.h"
};
@@ -94,7 +94,7 @@ static bfd_size_type go32exe_temp_stub_size = 0;
a stub, like gcc does. */
static void
-create_go32_stub (bfd *abfd)
+go32exe_create_stub (bfd *abfd)
{
/* Do it only once. */
if (coff_data (abfd)->stub == NULL)
@@ -198,7 +198,7 @@ create_go32_stub (bfd *abfd)
= bfd_alloc (abfd, (bfd_size_type) GO32EXE_DEFAULT_STUB_SIZE);
if (coff_data (abfd)->stub == NULL)
return;
- memcpy (coff_data (abfd)->stub, stub_bytes,
+ memcpy (coff_data (abfd)->stub, go32exe_default_stub,
GO32EXE_DEFAULT_STUB_SIZE);
coff_data (abfd)->stub_size = GO32EXE_DEFAULT_STUB_SIZE;
}
@@ -208,7 +208,7 @@ create_go32_stub (bfd *abfd)
to the new obfd. */
static bfd_boolean
-go32_stubbed_coff_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
+go32exe_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
{
/* Check if both are the same targets. */
if (ibfd->xvec != obfd->xvec)
@@ -249,7 +249,7 @@ go32exe_cleanup (bfd *abfd)
file offset. */
static bfd_cleanup
-go32_check_format (bfd *abfd)
+go32exe_check_format (bfd *abfd)
{
struct external_DOS_hdr filehdr_dos;
uint16_t num_pages;
@@ -368,7 +368,7 @@ go32exe_mkobject (bfd *abfd)
coff->relocbase = 0;
coff->local_toc_sym_map = 0;
- create_go32_stub (abfd);
+ go32exe_create_stub (abfd);
if (coff->stub == NULL)
{
bfd_release (abfd, coff);
--
2.25.2
next prev parent reply other threads:[~2020-03-19 19:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-19 19:19 [PATCH 0/3] coff-go32-exe: support variable-length stubs J.W. Jagersma
2020-03-19 19:19 ` [PATCH 1/3] always add base bfd->origin to file offset J.W. Jagersma
2020-03-19 19:19 ` [PATCH 2/3] coff-go32-exe: support variable-length stubs J.W. Jagersma
2020-03-19 19:19 ` J.W. Jagersma [this message]
2020-03-20 14:04 ` [PATCH 0/3] " Nick Clifton
2020-03-20 15:38 ` J.W. Jagersma
2020-03-20 19:42 ` DJ Delorie
2020-03-21 16:07 ` J.W. Jagersma
2020-04-01 16:45 ` J.W. Jagersma
2020-03-25 17:54 ` [PATCH 4/3+] coff-go32-exe: avoid reallocating stub on copy J.W. Jagersma
2020-04-02 13:34 ` [PATCH 0/3] coff-go32-exe: support variable-length stubs 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=20200319191923.34747-4-jwjagersma@gmail.com \
--to=jwjagersma@gmail.com \
--cc=binutils@sourceware.org \
--cc=dj@delorie.com \
--cc=stsp@users.sourceforge.net \
/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).