[Bug admin/10763] New: variable defined inside code in elf32-i386.c

2009-10-13 Thread jerker dot back at gmail dot com
Previously also reported to the binutils mailing list
This patch I believe explains the problem

===
RCS file: /cvs/src/src/bfd/elf32-i386.c,v
retrieving revision 1.225
diff -w -b -B -u -p -r1.225 elf32-i386.c
--- elf32-i386.c9 Sep 2009 21:38:57 -   1.225
+++ elf32-i386.c13 Oct 2009 02:16:33 -
@@ -4251,13 +4251,14 @@ elf_i386_finish_dynamic_symbol (bfd *out
}
  else
{
+ asection *plt;
  if (!h->pointer_equality_needed)
abort ();
 
  /* For non-shared object, we can't use .got.plt, which
 contains the real function addres if we need pointer
 equality.  We load the GOT entry with the PLT entry.  */
- asection *plt = htab->elf.splt ? htab->elf.splt : htab->elf.iplt;
+ plt = htab->elf.splt ? htab->elf.splt : htab->elf.iplt;
  bfd_put_32 (output_bfd,
  (plt->output_section->vma
   + plt->output_offset + h->plt.offset),

-- 
   Summary: variable defined inside code in elf32-i386.c
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: admin
AssignedTo: drow at sources dot redhat dot com
    ReportedBy: jerker dot back at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


http://sourceware.org/bugzilla/show_bug.cgi?id=10763

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10764] New: compiler option added after operands

2009-10-13 Thread jerker dot back at gmail dot com
The compiler option -Wno-error is added last, after the operand.
This is something my compiler isn't happy about

===
RCS file: /cvs/src/src/binutils/Makefile.am,v
retrieving revision 1.119
diff -w -b -B -u -p -r1.119 Makefile.am
--- Makefile.am 5 Sep 2009 11:09:34 -   1.119
+++ Makefile.am 13 Oct 2009 02:16:37 -
@@ -255,16 +255,16 @@ sysinfo$(EXEEXT_FOR_BUILD): sysinfo.o sy
 
 syslex.o: syslex.c sysinfo.h config.h
if [ -r syslex.c ]; then \
- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) syslex.c 
-Wno-error ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) -Wno-error 
syslex.c ; \
else \
- $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
$(srcdir)/syslex.c -Wno-error ;\
+ $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
-Wno-error $(srcdir)/syslex.c ;\
fi
 
 sysinfo.o: sysinfo.c
if [ -r sysinfo.c ]; then \
- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) sysinfo.c 
-Wno-error ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) -Wno-error 
sysinfo.c ; \
else \
- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) 
$(srcdir)/sysinfo.c
-Wno-error ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) -Wno-error
$(srcdir)/sysinfo.c ; \
fi

-- 
   Summary: compiler option added after operands
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: jerker dot back at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


http://sourceware.org/bugzilla/show_bug.cgi?id=10764

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/10766] New: Variable defined inside code in gas/config/tc-i386.c

2009-10-13 Thread jerker dot back at gmail dot com
The variable "expressionS *exp" is defined inside function code block.

===
RCS file: /cvs/src/src/gas/config/tc-i386.c,v
retrieving revision 1.399
diff -w -b -B -u -p -r1.399 tc-i386.c
--- config/tc-i386.c1 Oct 2009 14:31:43 -   1.399
+++ config/tc-i386.c13 Oct 2009 02:16:43 -
@@ -4866,6 +4866,7 @@ build_modrm_byte (void)
   const seg_entry *default_seg = 0;
   unsigned int source, dest;
   int vex_3_sources;
+  expressionS *exp;
 
   /* The first operand of instructions with VEX prefix and 3 sources
  must be VEX_Imm4.  */
@@ -4896,7 +4897,7 @@ build_modrm_byte (void)
 
   /* Generate an 8bit immediate operand to encode the register
 operand.  */
-  expressionS *exp = &im_expressions[i.imm_operands++];
+  exp = &im_expressions[i.imm_operands++];
   i.op[i.operands].imms = exp;
   i.types[i.operands] = imm8;
   i.operands++;

-- 
   Summary: Variable defined inside code in gas/config/tc-i386.c
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
AssignedTo: unassigned at sources dot redhat dot com
    ReportedBy: jerker dot back at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


http://sourceware.org/bugzilla/show_bug.cgi?id=10766

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug admin/10767] New: opcodes/i386-dis.c exceeds 256 levels of nested macros

2009-10-13 Thread jerker dot back at gmail dot com
This is not a bug, rather to inform that the current solution breaks the
MS x64 compiler <= 15.00.30729.01. There is a limit of max 256 levels
of nested macros. The Intel compiler v11.1 do not have this limit,
neither do gcc.

As there are no functional 64bit gcc for PE targets and the Intel
compiler is not fully compatible with NT POSIX, the only current
possible choice is the MS compiler to get 64bit binaries.

Here is a simple solution to get it working:
Preprocess opcodes/i386-dis.c with the Intel compiler. 
Extract "struct dis386 vex_table" to opcodes/i386-dis_tables.c
Apply the following patch:

===
RCS file: /cvs/src/src/opcodes/i386-dis.c,v
retrieving revision 1.200
diff -w -b -B -u -p -r1.200 i386-dis.c
--- i386-dis.c  15 Sep 2009 17:53:40 -  1.200
+++ i386-dis.c  13 Oct 2009 02:17:19 -
@@ -6316,7 +6316,9 @@ static const struct dis386 three_byte_ta
   },
 };
 
-
+#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+#include "i386-dis_tables.c"
+#else
 static const struct dis386 vex_table[][256] = {
   /* VEX_0F */
   {
@@ -7192,6 +7194,7 @@ static const struct dis386 vex_table[][2
 { "(bad)", { XX } },
   },
 };
+#endif
 
 static const struct dis386 vex_len_table[][2] = {
   /* VEX_LEN_10_P_1 */

-- 
   Summary: opcodes/i386-dis.c exceeds 256 levels of nested macros
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: admin
AssignedTo: drow at sources dot redhat dot com
        ReportedBy: jerker dot back at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


http://sourceware.org/bugzilla/show_bug.cgi?id=10767

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug admin/10767] opcodes/i386-dis.c exceeds 256 levels of nested macros

2009-10-13 Thread jerker dot back at gmail dot com

--- Additional Comments From jerker dot back at gmail dot com  2009-10-13 
16:51 ---
Oh, it was not meant as a fix. Just as an information.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10767

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug admin/10785] New: memory access violation in bfd/opncls.c

2009-10-15 Thread jerker dot back at gmail dot com
I get a memory access violation when running a 64-bit debug build of binutils 
current nm on x86_64 Interix. Like this:
nm-new /usr/lib/somelib

The shell print some lines and then become unresponsive

shell: Interix 64bit ksh (pdksh)
Compiler: Interix cc frontend of MS x64 compiler 15.00.30729.01

Running a 32bit Interix gcc 3.3 nm binary build will exit silently at same spot

The offending line is:
bfd/opncls.c(712): free (bim->buffer);
in this code block
-  
if ((abfd->flags & BFD_IN_MEMORY) != 0)
{
  /* FIXME: cagney/2004-02-15: Need to implement a BFD_IN_MEMORY io
 vector.
 Until that's done, at least don't leak memory.  */
  struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream;
  free (bim->buffer);
  free (bim);
  ret = TRUE;
}
  else
ret = abfd->iovec->bclose (abfd);

-

Note that free should work even if there are no memory allocated

-- 
   Summary: memory access violation in bfd/opncls.c
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: critical
  Priority: P2
 Component: admin
AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: jerker dot back at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


http://sourceware.org/bugzilla/show_bug.cgi?id=10785

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug admin/10767] opcodes/i386-dis.c exceeds 256 levels of nested macros

2009-10-15 Thread jerker dot back at gmail dot com

--- Additional Comments From jerker dot back at gmail dot com  2009-10-15 
23:32 ---
Problem solved, the code now compiles
Thanks!

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10767

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10785] memory access violation in bfd/opncls.c

2009-10-16 Thread jerker dot back at gmail dot com

--- Additional Comments From jerker dot back at gmail dot com  2009-10-16 
20:29 ---
Problem gone in both 64bit and 32bit builds
Thanks

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10785

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10792] New: variable declare inside code block in binutils/dlltool.c

2009-10-16 Thread jerker dot back at gmail dot com
variable declared inside code block.
Not all compilers are happy about it

===
RCS file: /cvs/src/src/binutils/dlltool.c,v
retrieving revision 1.93
diff -w -b -B -u -p -r1.93 dlltool.c
--- dlltool.c   4 Sep 2009 01:22:18 -   1.93
+++ dlltool.c   16 Oct 2009 20:36:00 -
@@ -3162,13 +3162,14 @@ gen_lib_file (int delay)
 static void
 dll_name_list_append (dll_name_list_type * list, bfd_byte * data)
 {
+  dll_name_list_node_type * entry;
+
   /* Error checking.  */
   if (! list || ! list->tail)
 return;
 
   /* Allocate new node.  */
-  dll_name_list_node_type * entry =
-(dll_name_list_node_type *) xmalloc (sizeof (dll_name_list_node_type));
+  entry = (dll_name_list_node_type *) xmalloc (sizeof 
(dll_name_list_node_type));
 
   /* Initialize its values.  */
   entry->dllname = xstrdup ((char *) data);
@@ -3184,12 +3185,14 @@ dll_name_list_append (dll_name_list_type
 static int 
 dll_name_list_count (dll_name_list_type * list)
 {
+  dll_name_list_node_type * p;
+  int count = 0;
+
   /* Error checking.  */
   if (! list || ! list->head)
 return 0;
 
-  int count = 0;
-  dll_name_list_node_type * p = list->head;
+  p = list->head;
 
   while (p && p->next)
 {
@@ -3204,11 +3207,13 @@ dll_name_list_count (dll_name_list_type 
 static void 
 dll_name_list_print (dll_name_list_type * list)
 {
+  dll_name_list_node_type * p;
+
   /* Error checking.  */
   if (! list || ! list->head)
 return;
 
-  dll_name_list_node_type * p = list->head;
+  p = list->head;
 
   while (p && p->next && p->next->dllname && *(p->next->dllname))
 {

-- 
   Summary: variable declare inside code block in binutils/dlltool.c
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
    AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: jerker dot back at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


http://sourceware.org/bugzilla/show_bug.cgi?id=10792

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10793] New: gcc cant get pass unused code in binutils/prdbg.c

2009-10-16 Thread jerker dot back at gmail dot com
I can't get Interix gcc 3.3 get pass this due to warning settings
(info is unused)

The solution it's a bit ugly, my gcc knowledge could be better.
Maybe you can come up with something more elegant?

===
RCS file: /cvs/src/src/binutils/prdbg.c,v
retrieving revision 1.23
diff -w -b -B -u -p -r1.23 prdbg.c
--- prdbg.c 10 Sep 2009 13:40:44 -  1.23
+++ prdbg.c 16 Oct 2009 20:36:01 -
@@ -2088,8 +2088,8 @@ tg_struct_field (void *p, const char *na
 static bfd_boolean
 tg_end_struct_type (void *p ATTRIBUTE_UNUSED)
 {
-  struct pr_handle *info = (struct pr_handle *) p;
-  assert (info->stack != NULL);
+  assert(((struct pr_handle *)p)->stack != NULL);
 
   return TRUE;
 }

-- 
   Summary: gcc cant get pass unused code in binutils/prdbg.c
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: minor
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: jerker dot back at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


http://sourceware.org/bugzilla/show_bug.cgi?id=10793

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10798] New: variable declare inside code block in binutils/dlltool.c

2009-10-17 Thread jerker dot back at gmail dot com
variable declared inside code block.
Not all compilers are happy about it

===
RCS file: /cvs/src/src/binutils/dlltool.c,v
retrieving revision 1.93
diff -w -b -B -u -p -r1.93 dlltool.c
--- dlltool.c   4 Sep 2009 01:22:18 -   1.93
+++ dlltool.c   16 Oct 2009 20:36:00 -
@@ -3162,13 +3162,14 @@ gen_lib_file (int delay)
 static void
 dll_name_list_append (dll_name_list_type * list, bfd_byte * data)
 {
+  dll_name_list_node_type * entry;
+
   /* Error checking.  */
   if (! list || ! list->tail)
 return;
 
   /* Allocate new node.  */
-  dll_name_list_node_type * entry =
-(dll_name_list_node_type *) xmalloc (sizeof (dll_name_list_node_type));
+  entry = (dll_name_list_node_type *) xmalloc (sizeof 
(dll_name_list_node_type));
 
   /* Initialize its values.  */
   entry->dllname = xstrdup ((char *) data);
@@ -3184,12 +3185,14 @@ dll_name_list_append (dll_name_list_type
 static int 
 dll_name_list_count (dll_name_list_type * list)
 {
+  dll_name_list_node_type * p;
+  int count = 0;
+
   /* Error checking.  */
   if (! list || ! list->head)
 return 0;
 
-  int count = 0;
-  dll_name_list_node_type * p = list->head;
+  p = list->head;
 
   while (p && p->next)
 {
@@ -3204,11 +3207,13 @@ dll_name_list_count (dll_name_list_type 
 static void 
 dll_name_list_print (dll_name_list_type * list)
 {
+  dll_name_list_node_type * p;
+
   /* Error checking.  */
   if (! list || ! list->head)
 return;
 
-  dll_name_list_node_type * p = list->head;
+  p = list->head;
 
   while (p && p->next && p->next->dllname && *(p->next->dllname))
 {

-- 
   Summary: variable declare inside code block in binutils/dlltool.c
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
    AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: jerker dot back at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


http://sourceware.org/bugzilla/show_bug.cgi?id=10798

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/11014] New: PAGE_SIZE redefined in dlltool.c

2009-11-24 Thread jerker dot back at gmail dot com
dlltool.c(244) defines PAGE_SIZE

The PAGE_SIZE symbol is/should be defined in limits.h on a POSIX system (see
http://www.opengroup.org). NT POSIX subsystem (SUA) defines it to 0x1
(10*0x1000). In my headers PAGE_SIZE is defined as an enum and dlltool.c
generates a compiler error due to PAGE_SIZE is defined before including system
headers.

I need advise how to fix this. 
Assuming setting PAGE_SIZE to 0x1000 is preferable, we can let dlltool.c set an
explicit value after including the system headers, like this:

Index: dlltool.c
===
RCS file: /cvs/src/src/binutils/dlltool.c,v
retrieving revision 1.97
diff -d -u -p -r1.97 dlltool.c
--- dlltool.c   28 Oct 2009 17:21:36 -  1.97
+++ dlltool.c   24 Nov 2009 17:27:50 -
@@ -241,9 +241,6 @@
 
 #define show_allnames 0
 
-#define PAGE_SIZE ((bfd_vma) 4096)
-#define PAGE_MASK ((bfd_vma) (-4096))
-
 #include "sysdep.h"
 #include "bfd.h"
 #include "libiberty.h"
@@ -259,6 +256,9 @@
 #include 
 #include 
 
+#define PAGE_SIZE ((bfd_vma) 4096)
+#define PAGE_MASK ((bfd_vma) (-4096))
+

-- 
   Summary: PAGE_SIZE redefined in dlltool.c
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
    ReportedBy: jerker dot back at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


http://sourceware.org/bugzilla/show_bug.cgi?id=11014

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/11016] New: PAGE_SIZE redefined in dlltool.c

2009-11-24 Thread jerker dot back at gmail dot com
dlltool.c(244) defines PAGE_SIZE

The PAGE_SIZE symbol is/should be defined in limits.h on a POSIX system (see
http://www.opengroup.org). NT POSIX subsystem (SUA) defines it to 0x1
(10*0x1000). In my headers PAGE_SIZE is defined as an enum and dlltool.c
generates a compiler error due to PAGE_SIZE is defined before including system
headers.

I need advise how to fix this. 
Assuming setting PAGE_SIZE to 0x1000 is preferable, we can let dlltool.c set an
explicit value after including the system headers, like this:

Index: dlltool.c
===
RCS file: /cvs/src/src/binutils/dlltool.c,v
retrieving revision 1.97
diff -d -u -p -r1.97 dlltool.c
--- dlltool.c   28 Oct 2009 17:21:36 -  1.97
+++ dlltool.c   24 Nov 2009 17:27:50 -
@@ -241,9 +241,6 @@
 
 #define show_allnames 0
 
-#define PAGE_SIZE ((bfd_vma) 4096)
-#define PAGE_MASK ((bfd_vma) (-4096))
-
 #include "sysdep.h"
 #include "bfd.h"
 #include "libiberty.h"
@@ -259,6 +256,9 @@
 #include 
 #include 
 
+#define PAGE_SIZE ((bfd_vma) 4096)
+#define PAGE_MASK ((bfd_vma) (-4096))
+

-- 
   Summary: PAGE_SIZE redefined in dlltool.c
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
    ReportedBy: jerker dot back at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


http://sourceware.org/bugzilla/show_bug.cgi?id=11016

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/11017] New: PAGE_SIZE redefined in dlltool.c

2009-11-24 Thread jerker dot back at gmail dot com
dlltool.c(244) defines PAGE_SIZE

The PAGE_SIZE symbol is/should be defined in limits.h on a POSIX system (see
http://www.opengroup.org). NT POSIX subsystem (SUA) defines it to 0x1
(10*0x1000). In my headers PAGE_SIZE is defined as an enum and dlltool.c
generates a compiler error due to PAGE_SIZE is defined before including system
headers.

I need advise how to fix this. 
Assuming setting PAGE_SIZE to 0x1000 is preferable, we can let dlltool.c set an
explicit value after including the system headers, like this:

Index: dlltool.c
===
RCS file: /cvs/src/src/binutils/dlltool.c,v
retrieving revision 1.97
diff -d -u -p -r1.97 dlltool.c
--- dlltool.c   28 Oct 2009 17:21:36 -  1.97
+++ dlltool.c   24 Nov 2009 17:27:50 -
@@ -241,9 +241,6 @@
 
 #define show_allnames 0
 
-#define PAGE_SIZE ((bfd_vma) 4096)
-#define PAGE_MASK ((bfd_vma) (-4096))
-
 #include "sysdep.h"
 #include "bfd.h"
 #include "libiberty.h"
@@ -259,6 +256,9 @@
 #include 
 #include 
 
+#define PAGE_SIZE ((bfd_vma) 4096)
+#define PAGE_MASK ((bfd_vma) (-4096))
+

-- 
   Summary: PAGE_SIZE redefined in dlltool.c
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
    ReportedBy: jerker dot back at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


http://sourceware.org/bugzilla/show_bug.cgi?id=11017

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/11017] PAGE_SIZE redefined in dlltool.c

2009-11-25 Thread jerker dot back at gmail dot com

--- Additional Comments From jerker dot back at gmail dot com  2009-11-25 
12:44 ---
(In reply to comment #1)
> Random comment coming out of the woodwork:
> I can't help thinking that you should change this and all uses to
> TARGET_PAGE_SIZE and TARGET_PAGE_MASK, and the problem would probably be 
solved.
> If you *really* need the host page size...no you don't.

That is an idea. TARGET_PAGE_SIZE=0x1000 is set by all targets using dlltool 
(AFAICS), but it is defined by the ld/emulparams scripts and used only in ld 
scripts. BTW HOST is TARGET, although dlltool is not currently used by 
Interix. It favours its own PE shared library solution.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11017

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/11017] PAGE_SIZE redefined in dlltool.c

2009-12-01 Thread jerker dot back at gmail dot com

--- Additional Comments From jerker dot back at gmail dot com  2009-12-01 
13:46 ---
Created an attachment (id=4434)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4434&action=view)
Solution based on COFF_PAGE_SIZE

Antother solution could be to use COFF_PAGE_SIZE. The COFF_PAGE_SIZE define
must then be moved from implementation to header.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11017

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils