This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

CREATE_OBJECT_SYMBOLS: not for ELF/x86 ?


Hello

i wonders why a CREATE_OBJECT_SYMBOLS in my ld script didn't produce new
entries in the object output file, so i just tested the example of your
ld manual ...

/* a.c */

afunction() { }
int adata=1;
int abss;

.. and so on!

but this also didn't produce those symbols in the output file.
My ld version is 2.15, from the debian testing distro, x86

Thanks for any help
josef


Here my outputted map file:

josef@melee:/res/tmp/test_CREATE_$ ld -M -T ldscript.lds a.o b.o 

Allocating common symbols
Common symbol       size              file

bbss                0x4               b.o
abss                0x4               a.o

Memory Configuration

Name             Origin             Length             Attributes
*default*        0x0000000000000000 0xffffffffffffffff

Linker script and memory map


.text           0x0000000000002020        0xd
 CREATE_OBJECT_SYMBOLS
 *(.text)
 .text          0x0000000000002020        0x5 a.o
                0x0000000000002020                afunction
 *fill*         0x0000000000002025 0x202500000003 00
 .text          0x0000000000002028        0x5 b.o
                0x0000000000002028                bfunction
                0x0000000000004000                _etext = ALIGN (0x2000)
LOAD a.o
LOAD b.o
OUTPUT(a.out elf32-i386)

.data           0x0000000000002030        0x8
 .data          0x0000000000002030        0x4 a.o
                0x0000000000002030                adata
 .data          0x0000000000002034        0x4 b.o
                0x0000000000002034                bdata

.bss            0x0000000000002038        0x8
 COMMON         0x0000000000002038        0x4 a.o
                                          0x0 (size before relaxing)
                0x0000000000002038                abss
 COMMON         0x000000000000203c        0x4 b.o
                                          0x0 (size before relaxing)
                0x000000000000203c                bbss

.note.GNU-stack
                0x0000000000000000        0x0

.comment        0x0000000000000000       0x4a
 .comment       0x0000000000000000       0x25 a.o
 .comment       0x0000000000000025       0x25 b.o


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]