ODR warning for "struct find_targ_sec_arg"
"struct find_targ_sec_arg" is defined in multiple .c files, causing ODR warnings. This patch renames the types. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395
This commit is contained in:
+4
-4
@@ -254,7 +254,7 @@ coff_locate_sections (bfd *abfd, asection *sectp, void *csip)
|
||||
/* Return the section_offsets* that CS points to. */
|
||||
static int cs_to_section (struct coff_symbol *, struct objfile *);
|
||||
|
||||
struct find_targ_sec_arg
|
||||
struct coff_find_targ_sec_arg
|
||||
{
|
||||
int targ_index;
|
||||
asection **resultp;
|
||||
@@ -263,7 +263,7 @@ struct find_targ_sec_arg
|
||||
static void
|
||||
find_targ_sec (bfd *abfd, asection *sect, void *obj)
|
||||
{
|
||||
struct find_targ_sec_arg *args = (struct find_targ_sec_arg *) obj;
|
||||
struct coff_find_targ_sec_arg *args = (struct coff_find_targ_sec_arg *) obj;
|
||||
|
||||
if (sect->target_index == args->targ_index)
|
||||
*args->resultp = sect;
|
||||
@@ -274,7 +274,7 @@ static struct bfd_section*
|
||||
cs_to_bfd_section (struct coff_symbol *cs, struct objfile *objfile)
|
||||
{
|
||||
asection *sect = NULL;
|
||||
struct find_targ_sec_arg args;
|
||||
struct coff_find_targ_sec_arg args;
|
||||
|
||||
args.targ_index = cs->c_secnum;
|
||||
args.resultp = §
|
||||
@@ -301,7 +301,7 @@ static CORE_ADDR
|
||||
cs_section_address (struct coff_symbol *cs, bfd *abfd)
|
||||
{
|
||||
asection *sect = NULL;
|
||||
struct find_targ_sec_arg args;
|
||||
struct coff_find_targ_sec_arg args;
|
||||
CORE_ADDR addr = 0;
|
||||
|
||||
args.targ_index = cs->c_secnum;
|
||||
|
||||
+4
-3
@@ -249,7 +249,7 @@ static void process_linenos (CORE_ADDR, CORE_ADDR);
|
||||
static int secnum_to_section (int, struct objfile *);
|
||||
static asection *secnum_to_bfd_section (int, struct objfile *);
|
||||
|
||||
struct find_targ_sec_arg
|
||||
struct xcoff_find_targ_sec_arg
|
||||
{
|
||||
int targ_index;
|
||||
int *resultp;
|
||||
@@ -262,7 +262,8 @@ static void find_targ_sec (bfd *, asection *, void *);
|
||||
static void
|
||||
find_targ_sec (bfd *abfd, asection *sect, void *obj)
|
||||
{
|
||||
struct find_targ_sec_arg *args = (struct find_targ_sec_arg *) obj;
|
||||
struct xcoff_find_targ_sec_arg *args
|
||||
= (struct xcoff_find_targ_sec_arg *) obj;
|
||||
struct objfile *objfile = args->objfile;
|
||||
|
||||
if (sect->target_index == args->targ_index)
|
||||
@@ -290,7 +291,7 @@ static void
|
||||
xcoff_secnum_to_sections (int n_scnum, struct objfile *objfile,
|
||||
asection **bfd_sect, int *secnum)
|
||||
{
|
||||
struct find_targ_sec_arg args;
|
||||
struct xcoff_find_targ_sec_arg args;
|
||||
|
||||
args.targ_index = n_scnum;
|
||||
args.resultp = secnum;
|
||||
|
||||
Reference in New Issue
Block a user