Skip to contentSkip to conversation

arm host: Fix linker warning (m68k targets)

PATCH In review Stefan Weil 3 participants 6 messages Jan 22, 2010 – Feb 27, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm host: Fix linker warning (m68k targets)

Compilation of m68k-softmmu or m68k-linux-user on arm host (or cross compilation for arm) results in a linker warning:

LINK m68k-softmmu/qemu-system-m68k
m68k-dis.o: warning: definition of `floatformat_ieee_single_little' overriding common
arm-dis.o: warning: common is here
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/bin/ld: Warning: size of symbol `floatformat_ieee_single_little' changed from 4 in arm-dis.o to 48 in m68k-dis.o

floatformat_ieee_single_little is declared in arm-dis.c and m68k-dis.c, and both declarations don't match, so this is an error.

The symbol is not needed in arm-dis.c, so I removed it there.

---
 arm-dis.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
arm-dis.c +2 -6
index 2c67d8f..4fb899e 100644
@@ -60,10 +60,8 @@
 #define FPU_VFP_EXT_V3	 0
 #define FPU_NEON_EXT_V1	 0
 
-int floatformat_ieee_single_little;
 /* Assume host uses ieee float.  */
-static void floatformat_to_double (int *ignored, unsigned char *data,
-                                   double *dest)
+static void floatformat_to_double (unsigned char *data, double *dest)
 {
     union {
         uint32_t i;
@@ -2543,9 +2541,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
                                 valbytes[2] = (value >> 16) & 0xff;
                                 valbytes[3] = (value >> 24) & 0xff;
 
-                                floatformat_to_double
-                                  (&floatformat_ieee_single_little, valbytes,
-                                  &fvalue);
+                                floatformat_to_double (valbytes, &fvalue);
 
                                 func (stream, "#%.7g\t; 0x%.8lx", fvalue,
                                       value);
Signature · 1 line
1.6.5
#1 lore raw
Quoted 48 lines · Stefan Weil

Compilation of m68k-softmmu or m68k-linux-user on arm host (or cross compilation for arm) results in a linker warning:

LINK m68k-softmmu/qemu-system-m68k
m68k-dis.o: warning: definition of `floatformat_ieee_single_little' overriding common
arm-dis.o: warning: common is here /usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/bin/ld:
Warning: size of symbol `floatformat_ieee_single_little' changed from 4 in arm-dis.o to 48 in m68k-dis.o

floatformat_ieee_single_little is declared in arm-dis.c and m68k-dis.c, and both declarations don't match, so this is an error.

The symbol is not needed in arm-dis.c, so I removed it there.

---
arm-dis.c | 8 ++------

1 files changed, 2 insertions(+), 6 deletions(-)
arm-dis.c +2 -6
index 2c67d8f..4fb899e 100644
@@ -60,10 +60,8 @@
 #define FPU_VFP_EXT_V3 0
 #define FPU_NEON_EXT_V1 0
 
-int floatformat_ieee_single_little;
 /* Assume host uses ieee float. */
-static void floatformat_to_double (int *ignored, unsigned char *data,
- double *dest)
+static void floatformat_to_double (unsigned char *data, double *dest)
 {
 union {
 uint32_t i;
@@ -2543,9 +2541,7 @@ print_insn_neon (struct disassemble_info *info,
 long given, bfd_boolean thumb)
 valbytes[2] = (value >> 16) & 0xff;
 valbytes[3] = (value >> 24) & 0xff;
 
- floatformat_to_double
- (&floatformat_ieee_single_little, valbytes,
- &fvalue);
+ floatformat_to_double (valbytes, &fvalue);
 
 func (stream, "#%.7g\t; 0x%.8lx", fvalue,
Quoted 1 line

value);

The patch is still missing in git. Maybe it got lost?

A linker warning about symbols which change from 4 to 48 byte should be regarded as error.

Regards,
Stefan Weil

#2 lore raw
Quoted 55 lines · Stefan Weil
Quoted 48 lines · Stefan Weil

Compilation of m68k-softmmu or m68k-linux-user on arm host (or cross compilation for arm) results in a linker warning:

LINK m68k-softmmu/qemu-system-m68k
m68k-dis.o: warning: definition of `floatformat_ieee_single_little' overriding common
arm-dis.o: warning: common is here /usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/bin/ld:
Warning: size of symbol `floatformat_ieee_single_little' changed from 4 in arm-dis.o to 48 in m68k-dis.o

floatformat_ieee_single_little is declared in arm-dis.c and m68k-dis.c, and both declarations don't match, so this is an error.

The symbol is not needed in arm-dis.c, so I removed it there.

---
arm-dis.c | 8 ++------

1 files changed, 2 insertions(+), 6 deletions(-)
arm-dis.c +2 -6
index 2c67d8f..4fb899e 100644
@@ -60,10 +60,8 @@
 #define FPU_VFP_EXT_V3 0
 #define FPU_NEON_EXT_V1 0
 
-int floatformat_ieee_single_little;
 /* Assume host uses ieee float. */
-static void floatformat_to_double (int *ignored, unsigned char *data,
- double *dest)
+static void floatformat_to_double (unsigned char *data, double *dest)
 {
 union {
 uint32_t i;
@@ -2543,9 +2541,7 @@ print_insn_neon (struct disassemble_info *info,
 long given, bfd_boolean thumb)
 valbytes[2] = (value >> 16) & 0xff;
 valbytes[3] = (value >> 24) & 0xff;
 
- floatformat_to_double
- (&floatformat_ieee_single_little, valbytes,
- &fvalue);
+ floatformat_to_double (valbytes, &fvalue);
 
 func (stream, "#%.7g\t; 0x%.8lx", fvalue,
Quoted 2 lines

value);

The patch is still missing in git. Maybe it got lost?

Quoted 6 lines

A linker warning about symbols which change from 4 to 48 byte should be regarded as error.

Regards,
Stefan Weil

I'd commit it myself if I had the rights, but I haven't. So the only think I can do is remind those who have...

Regards,
Stefan

#3 lore raw
Quoted 4 lines · Stefan Weil

I'd commit it myself if I had the rights, but I haven't. So the only think I can do is remind those who have...

Please resubmit. I would expect an ARM host patch to be applied by Paul but if he's not available to, I'll keep it my queue to be applied.

Regards,

Anthony Liguori

Quoted 4 lines

Regards,
Stefan

#4 lore raw

PATCH 1/1 arm host: Fix linker warning (m68k targets)

Compilation of m68k-softmmu or m68k-linux-user on arm host (or cross compilation for arm) results in a linker warning:

LINK m68k-softmmu/qemu-system-m68k
m68k-dis.o: warning: definition of `floatformat_ieee_single_little' overriding common
arm-dis.o: warning: common is here
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/bin/ld: Warning: size of symbol `floatformat_ieee_single_little' changed from 4 in arm-dis.o to 48 in m68k-dis.o

floatformat_ieee_single_little is declared in arm-dis.c and m68k-dis.c, and both declarations don't match, so this is an error.

The symbol is not needed in arm-dis.c, so I removed it there.

---
 arm-dis.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
arm-dis.c +2 -6
index 2c67d8f..4fb899e 100644
@@ -60,10 +60,8 @@
 #define FPU_VFP_EXT_V3	 0
 #define FPU_NEON_EXT_V1	 0
 
-int floatformat_ieee_single_little;
 /* Assume host uses ieee float.  */
-static void floatformat_to_double (int *ignored, unsigned char *data,
-                                   double *dest)
+static void floatformat_to_double (unsigned char *data, double *dest)
 {
     union {
         uint32_t i;
@@ -2543,9 +2541,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
                                 valbytes[2] = (value >> 16) & 0xff;
                                 valbytes[3] = (value >> 24) & 0xff;
 
-                                floatformat_to_double
-                                  (&floatformat_ieee_single_little, valbytes,
-                                  &fvalue);
+                                floatformat_to_double (valbytes, &fvalue);
 
                                 func (stream, "#%.7g\t; 0x%.8lx", fvalue,
                                       value);
Signature · 1 line
1.6.6.1
#5 lore raw
Quoted 8 lines · Stefan Weil

Compilation of m68k-softmmu or m68k-linux-user on arm host (or cross compilation for arm) results in a linker warning:

LINK m68k-softmmu/qemu-system-m68k
m68k-dis.o: warning: definition of `floatformat_ieee_single_little' overriding common
arm-dis.o: warning: common is here
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/bin/ld: Warning: size of symbol `floatformat_ieee_single_little' changed from 4 in arm-dis.o to 48 in m68k-dis.o

Quoted 4 lines

floatformat_ieee_single_little is declared in arm-dis.c and m68k-dis.c, and both declarations don't match, so this is an error.

The symbol is not needed in arm-dis.c, so I removed it there.

Thanks, applied.

Quoted 38 lines
---
 arm-dis.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
arm-dis.c +2 -6
index 2c67d8f..4fb899e 100644
@@ -60,10 +60,8 @@
 #define FPU_VFP_EXT_V3	 0
 #define FPU_NEON_EXT_V1	 0
 
-int floatformat_ieee_single_little;
 /* Assume host uses ieee float.  */
-static void floatformat_to_double (int *ignored, unsigned char *data,
-                                   double *dest)
+static void floatformat_to_double (unsigned char *data, double *dest)
 {
     union {
         uint32_t i;
@@ -2543,9 +2541,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
                                 valbytes[2] = (value >> 16) & 0xff;
                                 valbytes[3] = (value >> 24) & 0xff;
 
-                                floatformat_to_double
-                                  (&floatformat_ieee_single_little, valbytes,
-                                  &fvalue);
+                                floatformat_to_double (valbytes, &fvalue);
 
                                 func (stream, "#%.7g\t; 0x%.8lx", fvalue,
                                       value);
Signature · 1 line
1.6.6.1
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net