Re: incorrect alignment in .scommon section
Hi chenpp, mips-elf-gcc -I. -Iinclude -Iproject/S20/conf/main -I -O2 -fno-builtin -nostdinc -fno-delete-null-pointer-checks -EB -mabi=eabi -msoft-float -march=mips32 -c pid.c -o project/S20/build/main/target/S20/uart-init.o This command line just creates the object file. What is the command line that you use to link the object file and create the map file ? 0x000b5cf2test1 <-- unaligned !!! This certainly does appear to be a linker problem. Can you put together a small test case to demonstrate the problem ? I have tried using the information in your previous email, but I could not create an unaligned assignment for test1. (ie I always found that the linker was aligning test1 on a 4 byte boundary, so there must be some difference between my test and yours). Cheers Nick ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
Re: [Bug ld/2607] linker doesn't recognize an ELF library.
Hi Pawel, I will attach the three different shared objects, in the event that some maintainer has access to an appropriate Solaris/Sparc system and can determine what the issue is. Thanks. That has allowed me to locate the problem. The libbug.so.CC file has a section named .exception_ranges which has an link value of 0xFF00. Normally the link value should be a valid index into the section table in the ELF binary, and the BFD library was detecting this discrepancy and treating the file as invalid. The bug however was that certain other special values are allowed in the index field. Namely values in the range of SHN_LOPROC (0xFF00) to SHN_HIOS (0xFF3F). So please could you try out the uploaded patch which I hope will correct the problem. It certainly works for me using libbug.so.CC file that you supplied. Cheers Nick bfd/ChangeLog 2006-05-10 Nick Clifton <[EMAIL PROTECTED]> PR ld/2607 * elfcode.h (valid_section_index_p): New function: Checks for a valid section index. Allows indicies in the range SHN_LOPROC to SHN_HIOS. (elf_object_p): Use valid_section_index_p. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/2607] linker doesn't recognize an ELF library.
--- Additional Comments From nickc at redhat dot com 2006-05-10 12:23 --- Subject: Re: linker doesn't recognize an ELF library. Hi Pawel, > I will attach the three different shared objects, in the event that some > maintainer has access to an appropriate Solaris/Sparc system and can determine > what the issue is. Thanks. That has allowed me to locate the problem. The libbug.so.CC file has a section named .exception_ranges which has an link value of 0xFF00. Normally the link value should be a valid index into the section table in the ELF binary, and the BFD library was detecting this discrepancy and treating the file as invalid. The bug however was that certain other special values are allowed in the index field. Namely values in the range of SHN_LOPROC (0xFF00) to SHN_HIOS (0xFF3F). So please could you try out the uploaded patch which I hope will correct the problem. It certainly works for me using libbug.so.CC file that you supplied. Cheers Nick bfd/ChangeLog 2006-05-10 Nick Clifton <[EMAIL PROTECTED]> PR ld/2607 * elfcode.h (valid_section_index_p): New function: Checks for a valid section index. Allows indicies in the range SHN_LOPROC to SHN_HIOS. (elf_object_p): Use valid_section_index_p. -- http://sourceware.org/bugzilla/show_bug.cgi?id=2607 --- 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/2607] linker doesn't recognize an ELF library.
--- Additional Comments From nickc at redhat dot com 2006-05-10 12:24 --- Created an attachment (id=1016) --> (http://sourceware.org/bugzilla/attachment.cgi?id=1016&action=view) Fix determination of valid section indicies -- http://sourceware.org/bugzilla/show_bug.cgi?id=2607 --- 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/2607] linker doesn't recognize an ELF library.
-- What|Removed |Added Status|NEW |WAITING http://sourceware.org/bugzilla/show_bug.cgi?id=2607 --- 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/2607] linker doesn't recognize an ELF library.
--- Additional Comments From pluto at agmk dot net 2006-05-10 13:49 --- (In reply to comment #12) > Created an attachment (id=1016) --> (http://sourceware.org/bugzilla/attachment.cgi?id=1016&action=view) > Fix determination of valid section indicies works for me :) -- http://sourceware.org/bugzilla/show_bug.cgi?id=2607 --- 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/2607] linker doesn't recognize an ELF library.
--- Additional Comments From scp at predict dot com 2006-05-10 22:26 --- Nick, That patch, applied against the 2.16.1 release source (with a little syntactic fudge by hand on the last hunk) seems to do the trick perfectly. Thank you! (I'll leave it to you or others to change the status of the this bug. -- http://sourceware.org/bugzilla/show_bug.cgi?id=2607 --- 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/2607] linker doesn't recognize an ELF library.
--- Additional Comments From scp at predict dot com 2006-05-10 22:27 --- Uh, duh, I should point out that it solves my problem. I cannot speak for Pawel... -- http://sourceware.org/bugzilla/show_bug.cgi?id=2607 --- 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/2607] linker doesn't recognize an ELF library.
--- Additional Comments From pluto at agmk dot net 2006-05-10 22:31 --- patch fixes all testcases. -- What|Removed |Added Status|WAITING |RESOLVED Resolution||FIXED http://sourceware.org/bugzilla/show_bug.cgi?id=2607 --- 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