------- Comment #2 from bugzilla-gcc at thewrittenword dot com  2005-10-14 
05:23 -------
Looking at the section headers for one of the object files:
  $ elfdump -h .libs/allocator-inst.o
.libs/allocator-inst.o:

          **** SECTION  HEADER  TABLE ****
[No]   Type                  Addr       Offset     Size        Name
       Link       Info       Adralgn    Entsize    Flags

[1]    0x11                  0          0x34       0x8         .group
       43         0x25       0x4        0x4        0x00000000 

[2]    0x11                  0          0x3c       0x8         .group
       43         0x26       0x4        0x4        0x00000000 
...
[13]   SHT_PROGBITS          0          0xa0       0           .text
       0          0          0x10       0          0x00000006 ALLOC EXECINSTR 

[14]   SHT_PROGBITS          0          0xa0       0           .data
       0          0          0x10       0          0x00000003 WRITE ALLOC 
...

Notice for some of the section headers, we get numbers for the type (e.g. 0x11)
rather than a name (SHT_PROGBITS). Is this the reason for the ld error? I'm
thinking the section types in the elfdump -h output get converted to names for
the types ld knows about and left as numbers otherwise.

According to <elf.h>:
#define SHT_NULL        0               /* sh_type */
#define SHT_PROGBITS    1
#define SHT_SYMTAB      2
#define SHT_STRTAB      3
#define SHT_RELA        4
#define SHT_HASH        5
#define SHT_DYNAMIC     6
#define SHT_NOTE        7
#define SHT_NOBITS      8
#define SHT_REL         9
#define SHT_SHLIB       10
#define SHT_DYNSYM      11
#define SHT_NUM         12      /* Number of sh_types, not an actual */
                                /* sh_type. */
                                /* SHT_NUM must be one greater than the 
                                ** highest sh_type value.
                                */

I looked at .libs/allocator-inst.o from gcc-3.4.3 and didn't see the 0x11
section types.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24345

Reply via email to