[Bug binutils/945] [PATCH] dlltool import library compatibility with BCPP
--- Additional Comments From vanveghel at home dot nl 2005-05-12 09:07 --- Created an attachment (id=486) --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=486&action=view) dlltool import library compatibility with BCPP -- http://sources.redhat.com/bugzilla/show_bug.cgi?id=945 --- 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/945] [PATCH] dlltool import library compatibility with BCPP
--- Additional Comments From vanveghel at home dot nl 2005-05-12 09:18 --- Oh, the attachment of course depends on dll_name being relative to the actual path of the DLL (since it tries to open it) - that should probably be looked at. -- http://sources.redhat.com/bugzilla/show_bug.cgi?id=945 --- 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/945] New: [PATCH] dlltool import library compatibility with BCPP
Through circumstances beyond my control *cough* I've recently had to write some software in Borland C++ Builder 6 - now one of the libraries that I need I've created with cygwin / MingW; however, converting the .LIB created by dlltool for use with Borland (COFF2OMF) doesn't exactly work as it's supposed to - specifically, COFF2OMF is mistaking the stub file that dlltool creates for the actual DLL it has to load; Let me say first, though, that this is probably more of an error on the side of Borland than it is on that of dlltool, so I'm not expecting you to actually incorporate this patch into the current codebase (or at least not in it's current form) - but I thought I'd point it out here anyway and share my experiences, so that others that run into the same problems can have some use for it. Having said that, I've added a simple option to dlltool to indicate it should just use the dll_name variable as the stub filename, which seems to do the trick just perfectly, albeit in a rather dirty way ;-) The option and it's description should probably be changes aswell - I don't think it should mention Borland specifically, and right now it's suggesting it will create a Borland compatible library (OMF) .. I'm creating the DLL, the .LIB and the BCPP .LIB (COFF2OMF) like so: g++ -c test.cpp dlltool --bcpp-implib --add-underscore --dllname test.dll \ -e exports.o -l test.lib test.o g++ -mdll -mno-cygwin test.o exports.o -o test.dll coff2omf -q test.lib test_bcpp.lib Which creates a .LIB that still works with at least GCC (I haven't tried it with VC++) and of course now works with BCPP. Note that the --add-underscore is needed by BCPP, so perhaps it should be impliclity enabled by the --bcpp-implib option (though perhaps that behavior can be turned off in COFF2OMF) The patch is against dlltool 2.15.94 (20041229), which is supplied with cygwin - but ViewCVS reveals that the behavior hasn't seemed to have changed in later versions (but then I haven't actually tried it, so I could be wrong - or maybe I'm approaching the whole thing incorrectly to begin with ;-)) Anyway, this patch fixes my problems; I hope can be useful to others aswell. Kind regards, Jasper van Veghel -- Summary: [PATCH] dlltool import library compatibility with BCPP Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassigned at sources dot redhat dot com ReportedBy: vanveghel at home dot nl CC: bug-binutils at gnu dot org http://sources.redhat.com/bugzilla/show_bug.cgi?id=945 --- 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/945] [PATCH] dlltool import library compatibility with BCPP
--- Additional Comments From vanveghel at home dot nl 2005-05-12 12:10 --- .. and then it only seems to work if there's only one symbol being exported; otherwise it'll try to create and subsequently open the same file multiple times - still, the idea is there. I can't quite seem to pin-point exactly where the abfd filename gets written to the library (or stored in the archive to be written later - maybe in the BFD code?) - but it'll do, for now, for my intents and purposes :-) -- http://sources.redhat.com/bugzilla/show_bug.cgi?id=945 --- 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 ld/834] IA64: Change br to brl for "far" branches when possible
--- Additional Comments From hjl at lucon dot org 2005-05-12 16:12 --- A patch is postd at http://sourceware.org/ml/binutils/2005-05/msg00428.html -- http://sources.redhat.com/bugzilla/show_bug.cgi?id=834 --- 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 ld/834] IA64: Change br to brl for "far" branches when possible
--- Additional Comments From hjl at lucon dot org 2005-05-12 16:38 --- Slot 0 has to be NOP only for BBB. Here is an update. http://sourceware.org/ml/binutils/2005-05/msg00431.html -- http://sources.redhat.com/bugzilla/show_bug.cgi?id=834 --- 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/947] Extension to BFD and addr2line to print inlining chain
--- Additional Comments From fnf at specifixinc dot com 2005-05-12 19:11 --- Created an attachment (id=487) --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=487&action=view) Patch to implement unwinding of inlining chains -- http://sources.redhat.com/bugzilla/show_bug.cgi?id=947 --- 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/947] New: Extension to BFD and addr2line to print inlining chain
Consider the following test case: #include using namespace std; int main () { vector V(10); V[10] = 1; } Compile it like: g++ -O2 -ggdb -o t t.cc Run gdb and examine the first few instructions in main: (gdb) x/10i main 0x8048880 : push %ebp 0x8048881 : mov%esp,%ebp 0x8048883 : push %ebx 0x8048884 : sub$0x34,%esp 0x8048887 : and$0xfff0,%esp 0x804888a :sub$0x10,%esp 0x804888d :cmpb $0x0,0x804a7c0 0x8048894 :je 0x8048964 0x804889a :xor%eax,%eax 0x804889c :lea0xffe8(%ebp),%ebx Run addr2line on the address where the cmpb instruction is and you get (if you use the latest versions of gcc and binutils): $ addr2line -s -f -e t 0804888d _S_get_pool mt_allocator.h:450 The patch (which I'll attach separately) allows addr2line to print additional information about how we arrived at that address via several levels of inlining: $ addr2line -i -s -f -e t 0804888d _S_get_pool mt_allocator.h:450 __mt_alloc mt_allocator.h:656 allocator allocator.h:97 vector stl_vector.h:217 main t.cc:7 One possible use of this is in environments which trap various exceptions and want to print a traceback for the user, by calling addr2line on the current PC and each saved PC in the stack. In the case of functions that inline other functions, that traceback is incomplete because it misses all the inlined functions and the caller of inlined functions. I.E. for the current example, where the caller of main is probably _start(), it would appear that the current function (_S_get_pool) was called directly by _start, skipping main and all the other intermediate inlined functions. The patch is somewhat large because it adds another function to the BFD target structure, which currently returns FALSE for all non-DWARF2 environments. The meat of the changes is actually in bfd/dwarf2.c and binutils/addr2line.c. -- Summary: Extension to BFD and addr2line to print inlining chain Product: binutils Version: 2.17 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassigned at sources dot redhat dot com ReportedBy: fnf at specifixinc dot com CC: bug-binutils at gnu dot org,fnf at specifixinc dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://sources.redhat.com/bugzilla/show_bug.cgi?id=947 --- 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 ld/948] New: Wrong LMA for section with empty input section.
When an output section is empty, the AT() attribute is ignored and LMA=VMA in the output file. The LOADADDR(section) expression returns the correct value nonetheless. This is not really a problem when the section is really empty, ie size=0, but its a real problem when the section is not of size=0 because of an .=ALIGN(4) statement for example. In this case doing a simple objcopy -O binary a.out a.bin will cause an enormous a.bin. -- Summary: Wrong LMA for section with empty input section. Product: binutils Version: 2.15 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: fabrice_gautier at sdesigns dot com CC: bug-binutils at gnu dot org GCC host triplet: i386-pc-linux GCC target triplet: i386-pc-linux http://sources.redhat.com/bugzilla/show_bug.cgi?id=948 --- 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 ld/948] Wrong LMA for section with empty input section.
--- Additional Comments From fabrice_gautier at sdesigns dot com 2005-05-12 19:55 --- Created an attachment (id=488) --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=488&action=view) linker script and sample c code. This is a linker script and c code to reproduce the issue: $ gcc -c test-lma.c $ ld -T script.ld test-lma.o $ objdump -h a.out a.out: file format elf32-i386 Sections: Idx Name Size VMA LMA File off Algn 0 .text 0021 2000 1000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 0004 4000 1000 2000 2**2 CONTENTS, ALLOC, LOAD, DATA 2 .rodata 000c 4004 4004 2004 2**0 CONTENTS, ALLOC, LOAD, DATA 3 .bss 0004 4010 1010 2004 2**2 ALLOC 4 .note.GNU-stack 2004 2**0 CONTENTS, READONLY 5 .comment 0026 2004 2**0 CONTENTS, READONLY The problem is : 2 .rodata 000c 4004 4004 2004 2**0 It should be : 2 .rodata 000c 4004 1004 2004 2**0 -- Fabrice -- http://sources.redhat.com/bugzilla/show_bug.cgi?id=948 --- 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/949] New: No relocation overflow error for 14 bit immediate values
On sparc, instructions can hold a signed immediate value of 13 bits. Valid values are in the range [-4096, 4095] but gas allows values in the range [-8192, 8191] (= 14 bits). Consider the following code sniplet: -- .section".rodata" .align 8 outstr: .asciz "The Value is: %d\n" .section".text" .align 4 .global main main: save%sp, -120, %sp add %fp, -20, %o1 set outstr, %o0 mov %g0, %o1 add %o1, 8191, %o1 ! 8192 gives: immediate.s:14: Error: relocation overflow callprintf, 0 nop set outstr, %o0 mov %g0, %o1 add %o1, -8192, %o1 ! -8193 gives: immediate.s:20: Error: relocation overflow callprintf, 0 nop mov 0, %i0 nop ret restore - It compiles without warnings or errors but the output is: [EMAIL PROTECTED]:~/imm$ ./imm The Value is: -1 The Value is: 0 Which suggests that the 14 bits which are necessary to hold the range [-8192, 8191] got truncated to 13 bits without warning. FYI: $ uname -a SunOS rif23 5.9 Generic_117171-05 sun4u sparc $ psrinfo -v Status of processor 0 as of: 05/12/2005 22:14:40 Processor has been on-line since 05/12/2005 05:11:33. The sparcv9 processor operates at 502 MHz, and has a sparcv9 floating point processor. $ as --version GNU assembler 2.14 20030612 Copyright 2002 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. This assembler was configured for a target of `sparc-sun-solaris2.9'. Hotti -- Summary: No relocation overflow error for 14 bit immediate values Product: binutils Version: 2.14 Status: NEW Severity: normal Priority: P2 Component: gas AssignedTo: unassigned at sources dot redhat dot com ReportedBy: hodaniel at student dot ethz dot ch CC: bug-binutils at gnu dot org GCC host triplet: sparc-sun-solaris2.9 GCC target triplet: sparc-sun-solaris2.9 http://sources.redhat.com/bugzilla/show_bug.cgi?id=949 --- 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
Re: [Bug binutils/947] New: Extension to BFD and addr2line to print inlining chain
On Thu, 2005-05-12 at 12:10, fnf at specifixinc dot com wrote: > The patch (which I'll attach separately) allows addr2line to print > additional information about how we arrived at that address via several > levels of inlining: This binutils patch requires a gcc patch to emit the DW_AT_call_file and DW_AT_call_line info. I expect to check that in soon. I was waiting for proof that it did something useful before checking it in. This patch can be found here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20967 -- Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/947] Extension to BFD and addr2line to print inlining chain
--- Additional Comments From wilson at specifixinc dot com 2005-05-12 20:38 --- Subject: Re: New: Extension to BFD and addr2line to print inlining chain On Thu, 2005-05-12 at 12:10, fnf at specifixinc dot com wrote: > The patch (which I'll attach separately) allows addr2line to print > additional information about how we arrived at that address via several > levels of inlining: This binutils patch requires a gcc patch to emit the DW_AT_call_file and DW_AT_call_line info. I expect to check that in soon. I was waiting for proof that it did something useful before checking it in. This patch can be found here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20967 -- http://sources.redhat.com/bugzilla/show_bug.cgi?id=947 --- 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/950] New: hppa-elf cross as doesn't handle .globl properly
$ cat test.s .text .global : nop $ hppa-elf-as test.s test.s: Assembler messages: test.s:2: Error: Unknown opcode: `' -- Summary: hppa-elf cross as doesn't handle .globl properly Product: binutils Version: 2.16 Status: NEW Severity: normal Priority: P2 Component: gas AssignedTo: unassigned at sources dot redhat dot com ReportedBy: herbert at 13thfloor dot at CC: bug-binutils at gnu dot org GCC host triplet: i686-pc-linux-gnu GCC target triplet: hppa-*-elf http://sources.redhat.com/bugzilla/show_bug.cgi?id=950 --- 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/950] hppa-elf cross as doesn't handle .globl properly
--- Additional Comments From amodra at bigpond dot net dot au 2005-05-13 01:02 --- hppa-elf doesn't require a colon on labels; Anything starting in column 0 is a label. Your testcase has a funny label called ".global". -- What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID http://sources.redhat.com/bugzilla/show_bug.cgi?id=950 --- 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