ELF section in segment
Ulrich Weigand
uweigand@de.ibm.com
Sun May 6 19:03:00 GMT 2007
Alan Modra wrote:
> include/elf/
> * internal.h (ELF_IS_SECTION_IN_SEGMENT): Check both file offset
> and vma for appropriate sections.
> bfd/
> * elf.c (assign_file_positions_for_load_sections): Set sh_offset
> here. Set sh_type to SHT_NOBITS if we won't be allocating
> file space. Don't bump p_memsz for non-alloc sections. Adjust
> section-in-segment check.
> (assign_file_positions_for_non_load_sections): Don't set sh_offset
> here for sections that have already been handled above.
It looks like this patch broke GDB's generate-core-file capability:
(gdb) gcore /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test^M
BFD: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test: section `note0' can't be allocated in segment 0^M
warning: Failed to write corefile contents (Bad value).^M
BFD: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test: section `note0' can't be allocated in segment 0^M
warning: Failed to write corefile contents (Bad value).^M
BFD: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test: section `note0' can't be allocated in segment 0^M
warning: Failed to write corefile contents (Bad value).^M
BFD: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test: section `note0' can't be allocated in segment 0^M
warning: Failed to write corefile contents (Bad value).^M
BFD: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test: section `note0' can't be allocated in segment 0^M
warning: Failed to write corefile contents (Bad value).^M
BFD: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test: section `note0' can't be allocated in segment 0^M
warning: Failed to write corefile contents (Bad value).^M
BFD: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test: section `note0' can't be allocated in segment 0^M
warning: Failed to write corefile contents (Bad value).^M
BFD: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test: section `note0' can't be allocated in segment 0^M
warning: Failed to write corefile contents (Bad value).^M
BFD: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test: section `note0' can't be allocated in segment 0^M
warning: Failed to write corefile contents (Bad value).^M
BFD: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test: section `note0' can't be allocated in segment 0^M
warning: Failed to write corefile contents (Bad value).^M
BFD: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test: section `note0' can't be allocated in segment 0^M
warning: writing note section (Bad value)^M
Saved corefile /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/gcore.test^M
Reverting the patch makes the error go away ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
More information about the Binutils
mailing list