Skip to contentSkip to conversation

volunteer sought for a binutils project

parisc-linux Randolph Chung 1 participant 1 message Apr 9, 2002

lore
Share & tools
lore
#0 lore raw

When building 64-bit kernels, the linker puts dynamic sections into the resulting vmlinux file. This is not harmful per se, but is nonetheless wrong (and confuses some of the modutils tools). Alan Modra explains the situation and how to fix it below. Anyone feel like give this a shot?

randolph

----- Forwarded message from Alan Modra <[email protected]> -----

Date: Mon, 8 Apr 2002 17:18:29 +0930
From: Alan Modra <[email protected]>
To: Randolph Chung <[email protected]>
Cc: [email protected]
Subject: Re: unwind sections not sorted?

Quoted 4 lines

legolas[19:30] t% readelf -d ./vmlinux-pa7

Dynamic segment at offset 0x25ee30 contains 11 entries:
Tag Type Name/Value

Quoted 8 lines
 0x0000000000000004 (HASH)               0x102ee4e0
 0x0000000000000005 (STRTAB)             0x102ee4d8
 0x0000000000000006 (SYMTAB)             0x102ee4d8
 0x000000000000000a (STRSZ)              1 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)

0x0000000060000001 (<unknown>: 60000001) 0 0x0000000000000003 (PLTGOT) 0x10383470
0x0000000000000015 (DEBUG) 0x0
0x0000000060000002 (<unknown>: 60000002) 0x0 0x0000000060000000 (<unknown>: 60000000) 0x102f6000 0x0000000000000000 (NULL) 0x0

Hrrm. OK, another bug in elf64-hppa.c. elf64_hppa_check_relocs creates _all_ the dynamic sections whether needed or not. It certainly shouldn't be calling bfd_elf64_link_create_dynamic_sections, but rather call elf64_hppa_create_dynamic_sections to create the sections the backend needs. Then of course, elf64_hppa_create_dynamic_sections needs to be modified to not duplicate sections.

Signature · 4 lines
Alan Modra
IBM OzLabs - Linux Technology Centre

----- End forwarded message -----