Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: nbctfmerge runs for hours on custom i386 kernels



> On 02 Mar 2016, at 09:11, Martin Husemann <martin%duskware.de@localhost> wrote:
> 
> On Tue, Mar 01, 2016 at 05:42:51PM -0600, John D. Baker wrote:
>> I have so-far observed this only on i386 and not any of the other
>> architectures I build.
> 
> This is probably caused by ld.elf_so bugs. There is a pullup request
> pending to (hopefully) fix this.
> 
> A simple test (and easy workaround) is to extract usr/libexec/ld.elf_so
> from a -current i386 base.tgz and put that on your machine.

For me it is nbctfconvert that creates bad ctf sections on i386 and makes
nbctfmerge run for an hour on debug (-g) kernels.

Reverting this

@@ -108,5 +122,6 @@ _dwarf_elf_relocate(Dwarf_Debug dbg, Elf
                }
 
-               if (sh.sh_type != SHT_RELA || sh.sh_size == 0)
+               if ((sh.sh_type != SHT_REL && sh.sh_type != SHT_RELA) ||
+                    sh.sh_size == 0)
                        continue;

from the recent change to external/bsd/elftoolchain/dist/libdwarf/libdwarf_elf_init.c
makes my builds happy again.

Looks like the the .debug_info section gets modified to always return
the string at offset 0. 

Running nbctfconvert with "CTFCONVERT_DEBUG_LEVEL=9” I get from an amd64
object:

DEBUG: NO stabs: .stab=-1, .stabstr=0
DEBUG: DWARF version: 4
DEBUG: DWARF emitter: GNU C 4.8.5 -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -mno-avx -msoft-float -mtune=nocona -march=x86-64 -g -O2 -std=gnu99 -std=gnu99 -ffreestanding -fno-zero-initialized-in-bss -fno-omit-frame-pointer -fstack-protector -fno-strict-aliasing -fno-common --param ssp-buffer-size=1
DEBUG: CU name: vers.c
DEBUG: die 29 <0x1d>: create_one
DEBUG: die 29: creating base type
DEBUG: die 29: name "signed char" remapped to "char"

and from an i386 object:

DEBUG: NO stabs: .stab=-1, .stabstr=0
DEBUG: DWARF version: 4
DEBUG: DWARF emitter: long long int
DEBUG: CU name: long long int
DEBUG: die 29 <0x1d>: create_one
DEBUG: die 29: creating base type
DEBUG: die 29: name "long long int" remapped to "long long"


--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)




Home | Main Index | Thread Index | Old Index