Shared library size

I am porting a library from Windows to QNX. If I use the conventional
format of the makefile like the following, the library size is half of
the
size that is generated by using the QNX format makefile/common.mk. The
size of the objects, however, are very close between these two build
process.

SONAME=libfs.so
S = /
NTOTARGET=gcc_ntox86 -DNTO_X86
CC = qcc
INCLUDE1 = -I/usr/include -I…/…/2.2.4 -I…/include
CFLAGS = -DQNX -V $(NTOTARGET) $(GDB_DEBUG) -shared -lang-c -W p,
-nostdinc $(INCLUDE1) -I.
…c:
$(cc) $(cflags) $*.c
BUILDFILES1 = st.o aes…o er.o ch.o dst.o
all:
$(SONAME)
$(SONAME):
$(BUILDFILES1)
$(CC) -V $(NTOTARGET) $(GDB_DEBUG) -shared
-Wl,–version-script=export.qnx -Wl,-h $@
$(BUILDFILES1) -o …$Slib$S$@

I have notice the following difference:

Conventional makefile link,
qcc -V gcc_ntox86 -DNTO_X86 -shared -Wl,–version-script=export.qnx
-Wl,-hlibfs.so st.o aes.o er.o ch.o dst.o -o …/lib/libfs.so
The QNX default link,
qcc -Vgcc_ntox86 -shared -Wl,-h libfs.so -Wl,–script-version=exprot.qnx
-o libfs.so st.o aes.o er.o ch.o dst.o -L. -L/x86/lib -L/x86/usr/lib
-Wl,-Bsymbolic libfs.so

How do I take out some of the link flags so that the size of the library
will be smaller?

Would appreciate any advise.

-Beth

Make sure they are actually different runtime sizes by checkout
the output of the “size” utility on your shared lib. Then, check
to see what shared libraries each of them are using by runing
“objdump -x libfs.so | grep NEEDED”.

chris


Beth <id@address.com> wrote:

I am porting a library from Windows to QNX. If I use the conventional
format of the makefile like the following, the library size is half of
the
size that is generated by using the QNX format makefile/common.mk. The
size of the objects, however, are very close between these two build
process.

SONAME=libfs.so
S = /
NTOTARGET=gcc_ntox86 -DNTO_X86
CC = qcc
INCLUDE1 = -I/usr/include -I…/…/2.2.4 -I…/include
CFLAGS = -DQNX -V $(NTOTARGET) $(GDB_DEBUG) -shared -lang-c -W p,
-nostdinc $(INCLUDE1) -I.
.c:
$(cc) $(cflags) $*.c
BUILDFILES1 = st.o aes…o er.o ch.o dst.o
all:
$(SONAME)
$(SONAME):
$(BUILDFILES1)
$(CC) -V $(NTOTARGET) $(GDB_DEBUG) -shared
-Wl,–version-script=export.qnx -Wl,-h $@
$(BUILDFILES1) -o …$Slib$S$@

I have notice the following difference:

Conventional makefile link,
qcc -V gcc_ntox86 -DNTO_X86 -shared -Wl,–version-script=export.qnx
-Wl,-hlibfs.so st.o aes.o er.o ch.o dst.o -o …/lib/libfs.so
The QNX default link,
qcc -Vgcc_ntox86 -shared -Wl,-h libfs.so -Wl,–script-version=exprot.qnx
-o libfs.so st.o aes.o er.o ch.o dst.o -L. -L/x86/lib -L/x86/usr/lib
-Wl,-Bsymbolic libfs.so

How do I take out some of the link flags so that the size of the library
will be smaller?

Would appreciate any advise.

-Beth


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Chris, thanks for your reply.

Both shared libraries use libc.so.2.

What do you mean the “size” utility ?

Same source code, different makefile and build process, the library size is
doubled.

Any advise?

Regards,
-Beth

Chris McKillop wrote:

Make sure they are actually different runtime sizes by checkout
the output of the “size” utility on your shared lib. Then, check
to see what shared libraries each of them are using by runing
“objdump -x libfs.so | grep NEEDED”.

chris

Beth <> id@address.com> > wrote:
I am porting a library from Windows to QNX. If I use the conventional
format of the makefile like the following, the library size is half of
the
size that is generated by using the QNX format makefile/common.mk. The
size of the objects, however, are very close between these two build
process.

SONAME=libfs.so
S = /
NTOTARGET=gcc_ntox86 -DNTO_X86
CC = qcc
INCLUDE1 = -I/usr/include -I…/…/2.2.4 -I…/include
CFLAGS = -DQNX -V $(NTOTARGET) $(GDB_DEBUG) -shared -lang-c -W p,
-nostdinc $(INCLUDE1) -I.
.c:
$(cc) $(cflags) $*.c
BUILDFILES1 = st.o aes…o er.o ch.o dst.o
all:
$(SONAME)
$(SONAME):
$(BUILDFILES1)
$(CC) -V $(NTOTARGET) $(GDB_DEBUG) -shared
-Wl,–version-script=export.qnx -Wl,-h $@
$(BUILDFILES1) -o …$Slib$S$@

I have notice the following difference:

Conventional makefile link,
qcc -V gcc_ntox86 -DNTO_X86 -shared -Wl,–version-script=export.qnx
-Wl,-hlibfs.so st.o aes.o er.o ch.o dst.o -o …/lib/libfs.so
The QNX default link,
qcc -Vgcc_ntox86 -shared -Wl,-h libfs.so -Wl,–script-version=exprot.qnx
-o libfs.so st.o aes.o er.o ch.o dst.o -L. -L/x86/lib -L/x86/usr/lib
-Wl,-Bsymbolic libfs.so

How do I take out some of the link flags so that the size of the library
will be smaller?

Would appreciate any advise.

-Beth


\

Chris McKillop <> cdm@qnx.com> > “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Beth <id@address.com> wrote:

Chris, thanks for your reply.

Both shared libraries use libc.so.2.

What do you mean the “size” utility ?

Same source code, different makefile and build process, the library size is
doubled.

What are you basing the “doubled” size on? The output of “ls -l”? What you
need to do is run “size libfs.so” and see what the different code/data/bss
sizes are as this is what is actually “in ram”. Have you run “strip -g”
on both of them?

chris

Also add the -M option to generate a map file, then look at the libs etc
being pulled in.

Chris McKillop <cdm@qnx.com> wrote:

Beth <> id@address.com> > wrote:

Chris, thanks for your reply.

Both shared libraries use libc.so.2.

What do you mean the “size” utility ?

Same source code, different makefile and build process, the library size is
doubled.


What are you basing the “doubled” size on? The output of “ls -l”? What you
need to do is run “size libfs.so” and see what the different code/data/bss
sizes are as this is what is actually “in ram”. Have you run “strip -g”
on both of them?

chris


cburgess@qnx.com

The only significant difference I can see is the -Bsymbolic - does that
affect your lib size?

Beth <id@address.com> wrote:

I am porting a library from Windows to QNX. If I use the conventional
format of the makefile like the following, the library size is half of
the
size that is generated by using the QNX format makefile/common.mk. The
size of the objects, however, are very close between these two build
process.

SONAME=libfs.so
S = /
NTOTARGET=gcc_ntox86 -DNTO_X86
CC = qcc
INCLUDE1 = -I/usr/include -I…/…/2.2.4 -I…/include
CFLAGS = -DQNX -V $(NTOTARGET) $(GDB_DEBUG) -shared -lang-c -W p,
-nostdinc $(INCLUDE1) -I.
.c:
$(cc) $(cflags) $*.c
BUILDFILES1 = st.o aes…o er.o ch.o dst.o
all:
$(SONAME)
$(SONAME):
$(BUILDFILES1)
$(CC) -V $(NTOTARGET) $(GDB_DEBUG) -shared
-Wl,–version-script=export.qnx -Wl,-h $@
$(BUILDFILES1) -o …$Slib$S$@

I have notice the following difference:

Conventional makefile link,
qcc -V gcc_ntox86 -DNTO_X86 -shared -Wl,–version-script=export.qnx
-Wl,-hlibfs.so st.o aes.o er.o ch.o dst.o -o …/lib/libfs.so
The QNX default link,
qcc -Vgcc_ntox86 -shared -Wl,-h libfs.so -Wl,–script-version=exprot.qnx
-o libfs.so st.o aes.o er.o ch.o dst.o -L. -L/x86/lib -L/x86/usr/lib
-Wl,-Bsymbolic libfs.so

How do I take out some of the link flags so that the size of the library
will be smaller?

Would appreciate any advise.

-Beth


cburgess@qnx.com

I did use “ls-l” and saw the library size difference.
When I run “size libfs.so”, they are different in text/data/dec.

After strip -g the size is a little bit smaller but not close to the one that I
built using
conventional format of makefile.

Thanks,
-Beth


Chris McKillop wrote:

Beth <> id@address.com> > wrote:

Chris, thanks for your reply.

Both shared libraries use libc.so.2.

What do you mean the “size” utility ?

Same source code, different makefile and build process, the library size is
doubled.


What are you basing the “doubled” size on? The output of “ls -l”? What you
need to do is run “size libfs.so” and see what the different code/data/bss
sizes are as this is what is actually “in ram”. Have you run “strip -g”
on both of them?

chris

It might affect the lib size. How do I not to link with -Bsymbolic.

Thanks for your help.
-Beth

Colin Burgess wrote:

The only significant difference I can see is the -Bsymbolic - does that
affect your lib size?

Beth <> id@address.com> > wrote:
I am porting a library from Windows to QNX. If I use the conventional
format of the makefile like the following, the library size is half of
the
size that is generated by using the QNX format makefile/common.mk. The
size of the objects, however, are very close between these two build
process.

SONAME=libfs.so
S = /
NTOTARGET=gcc_ntox86 -DNTO_X86
CC = qcc
INCLUDE1 = -I/usr/include -I…/…/2.2.4 -I…/include
CFLAGS = -DQNX -V $(NTOTARGET) $(GDB_DEBUG) -shared -lang-c -W p,
-nostdinc $(INCLUDE1) -I.
.c:
$(cc) $(cflags) $*.c
BUILDFILES1 = st.o aes…o er.o ch.o dst.o
all:
$(SONAME)
$(SONAME):
$(BUILDFILES1)
$(CC) -V $(NTOTARGET) $(GDB_DEBUG) -shared
-Wl,–version-script=export.qnx -Wl,-h $@
$(BUILDFILES1) -o …$Slib$S$@

I have notice the following difference:

Conventional makefile link,
qcc -V gcc_ntox86 -DNTO_X86 -shared -Wl,–version-script=export.qnx
-Wl,-hlibfs.so st.o aes.o er.o ch.o dst.o -o …/lib/libfs.so
The QNX default link,
qcc -Vgcc_ntox86 -shared -Wl,-h libfs.so -Wl,–script-version=exprot.qnx
-o libfs.so st.o aes.o er.o ch.o dst.o -L. -L/x86/lib -L/x86/usr/lib
-Wl,-Bsymbolic libfs.so

How do I take out some of the link flags so that the size of the library
will be smaller?

Would appreciate any advise.

-Beth


cburgess@qnx.com

Beth <id@address.com> wrote:

It might affect the lib size. How do I not to link with -Bsymbolic.

Build it in a nto/x86/so rather than nto/x86/dll directory.

Could you also post the results of objdump -h for both libs?

\

cburgess@qnx.com

Colin, thanks for your help.

I will try to build it in the so directory. Here are two objdump -h from
both libs.

Large size lib output
libfs.so: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00000230 000000b4 000000b4 000000b4 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00000470 000002e4 000002e4 000002e4 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 00000d98 00000754 00000754 00000754 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 0000008e 000014ec 000014ec 000014ec 2
1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_d 00000038 0000157c 0000157c 0000157c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.data 00000178 000015b4 000015b4 000015b4 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.ctors 00000008 0000172c 0000172c 0000172c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .rel.dtors 00000008 00001734 00001734 00001734 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rel.got 00000128 0000173c 0000173c 0000173c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rel.plt 00000088 00001864 00001864 00001864 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 00000008 000018ec 000018ec 000018ec 20
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00000120 000018f4 000018f4 000018f4 2
2
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 00010d98 00001a14 00001a14 00001a14 22
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000008 000127ac 000127ac 000127ac 2
0
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00003ab1 000127c0 000127c0 000127c0 25
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .note0 00000000 00016271 00016271 00016271 2
0
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .data 00000a74 00017280 00017280 00016280 25
CONTENTS, ALLOC, LOAD, DATA
17 .ctors 0000000c 00017cf4 00017cf4 00016cf4 2
2
CONTENTS, ALLOC, LOAD, DATA
18 .dtors 0000000c 00017d00 00017d00 00016d00 22
CONTENTS, ALLOC, LOAD, DATA
19 .got 000000e4 00017d0c 00017d0c 00016d0c 2
2
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 000000a8 00017df0 00017df0 00016df0 22
CONTENTS, ALLOC, LOAD, DATA
21 .bss 000f4288 00017ea0 00017ea0 00016ea0 2
5
ALLOC
22 .comment 000002ac 00000000 00000000 00016ee8 20
CONTENTS, READONLY
23 .note 0000004c 00000000 00000000 00016e98 2
0
CONTENTS, READONLY
24 QNX_usage 000001d3 00000000 00000000 0001ac16 2**0
CONTENTS, READONLY

Small size output
libfs.so: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00000294 000000b4 000000b4 000000b4 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00000600 00000348 00000348 00000348 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 0000056d 00000948 00000948 00000948 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 000000c0 00000eb6 00000eb6 00000eb6 2
1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_d 00000038 00000f78 00000f78 00000f78 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.data 00000010 00000fb0 00000fb0 00000fb0 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.ctors 00000008 00000fc0 00000fc0 00000fc0 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .rel.dtors 00000008 00000fc8 00000fc8 00000fc8 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rel.got 00000028 00000fd0 00000fd0 00000fd0 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rel.plt 00000180 00000ff8 00000ff8 00000ff8 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 00000008 00001178 00001178 00001178 20
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00000310 00001180 00001180 00001180 2
2
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 00006ce8 00001490 00001490 00001490 22
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000008 00008178 00008178 00008178 2
0
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00000003 00008180 00008180 00008180 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .note0 00000000 00008183 00008183 00008183 2
0
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .data 00000914 000091a0 000091a0 000081a0 25
CONTENTS, ALLOC, LOAD, DATA
17 .ctors 0000000c 00009ab4 00009ab4 00008ab4 2
2
CONTENTS, ALLOC, LOAD, DATA
18 .dtors 0000000c 00009ac0 00009ac0 00008ac0 22
CONTENTS, ALLOC, LOAD, DATA
19 .got 000000e0 00009acc 00009acc 00008acc 2
2
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 000000a0 00009bac 00009bac 00008bac 22
CONTENTS, ALLOC, LOAD, DATA
21 .bss 000f4288 00009c60 00009c60 00008c60 2
5
ALLOC
22 .comment 00000260 00000000 00000000 00008c60 20
CONTENTS, READONLY
23 .note 00000140 00000000 00000000 00008ec0 2
0
CONTENTS, READONLY

Regards,
-Beth


Colin Burgess wrote:

Beth <> id@address.com> > wrote:
It might affect the lib size. How do I not to link with -Bsymbolic.

Build it in a nto/x86/so rather than nto/x86/dll directory.

Could you also post the results of objdump -h for both libs?


cburgess@qnx.com

Well, the rodata and text sections are much bigger, but I’m not sure how
the link could be causing that.

It could also be something different about the compile. I would try
using the objects from the QNX makefile build with the original link
command, see if it is still large.

Beth <id@address.com> wrote:

Colin, thanks for your help.

I will try to build it in the so directory. Here are two objdump -h from
both libs.

Large size lib output
libfs.so: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00000230 000000b4 000000b4 000000b4 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00000470 000002e4 000002e4 000002e4 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 00000d98 00000754 00000754 00000754 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 0000008e 000014ec 000014ec 000014ec 2
1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_d 00000038 0000157c 0000157c 0000157c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.data 00000178 000015b4 000015b4 000015b4 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.ctors 00000008 0000172c 0000172c 0000172c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .rel.dtors 00000008 00001734 00001734 00001734 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rel.got 00000128 0000173c 0000173c 0000173c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rel.plt 00000088 00001864 00001864 00001864 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 00000008 000018ec 000018ec 000018ec 20
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00000120 000018f4 000018f4 000018f4 2
2
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 00010d98 00001a14 00001a14 00001a14 22
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000008 000127ac 000127ac 000127ac 2
0
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00003ab1 000127c0 000127c0 000127c0 25
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .note0 00000000 00016271 00016271 00016271 2
0
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .data 00000a74 00017280 00017280 00016280 25
CONTENTS, ALLOC, LOAD, DATA
17 .ctors 0000000c 00017cf4 00017cf4 00016cf4 2
2
CONTENTS, ALLOC, LOAD, DATA
18 .dtors 0000000c 00017d00 00017d00 00016d00 22
CONTENTS, ALLOC, LOAD, DATA
19 .got 000000e4 00017d0c 00017d0c 00016d0c 2
2
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 000000a8 00017df0 00017df0 00016df0 22
CONTENTS, ALLOC, LOAD, DATA
21 .bss 000f4288 00017ea0 00017ea0 00016ea0 2
5
ALLOC
22 .comment 000002ac 00000000 00000000 00016ee8 20
CONTENTS, READONLY
23 .note 0000004c 00000000 00000000 00016e98 2
0
CONTENTS, READONLY
24 QNX_usage 000001d3 00000000 00000000 0001ac16 2**0
CONTENTS, READONLY

Small size output
libfs.so: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00000294 000000b4 000000b4 000000b4 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00000600 00000348 00000348 00000348 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 0000056d 00000948 00000948 00000948 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 000000c0 00000eb6 00000eb6 00000eb6 2
1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_d 00000038 00000f78 00000f78 00000f78 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.data 00000010 00000fb0 00000fb0 00000fb0 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.ctors 00000008 00000fc0 00000fc0 00000fc0 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .rel.dtors 00000008 00000fc8 00000fc8 00000fc8 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rel.got 00000028 00000fd0 00000fd0 00000fd0 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rel.plt 00000180 00000ff8 00000ff8 00000ff8 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 00000008 00001178 00001178 00001178 20
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00000310 00001180 00001180 00001180 2
2
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 00006ce8 00001490 00001490 00001490 22
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000008 00008178 00008178 00008178 2
0
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00000003 00008180 00008180 00008180 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .note0 00000000 00008183 00008183 00008183 2
0
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .data 00000914 000091a0 000091a0 000081a0 25
CONTENTS, ALLOC, LOAD, DATA
17 .ctors 0000000c 00009ab4 00009ab4 00008ab4 2
2
CONTENTS, ALLOC, LOAD, DATA
18 .dtors 0000000c 00009ac0 00009ac0 00008ac0 22
CONTENTS, ALLOC, LOAD, DATA
19 .got 000000e0 00009acc 00009acc 00008acc 2
2
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 000000a0 00009bac 00009bac 00008bac 22
CONTENTS, ALLOC, LOAD, DATA
21 .bss 000f4288 00009c60 00009c60 00008c60 2
5
ALLOC
22 .comment 00000260 00000000 00000000 00008c60 20
CONTENTS, READONLY
23 .note 00000140 00000000 00000000 00008ec0 2
0
CONTENTS, READONLY

Regards,
-Beth



Colin Burgess wrote:

Beth <> id@address.com> > wrote:
It might affect the lib size. How do I not to link with -Bsymbolic.

Build it in a nto/x86/so rather than nto/x86/dll directory.

Could you also post the results of objdump -h for both libs?


cburgess@qnx.com


cburgess@qnx.com

Here is what I did.

  • Changed dll directory to so directory, link with -Bsymbol. The library size
    didn’t change.
  • Took obj files from build that used conventional makefile, and link used QNX
    makefile,
    the library file size was still large.

/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibfs.so.1
-Wl,–version-script=/devewc/src/nto/clic/
pto.qnx -o/devewc/src/nto/clic/x86/so/libfs.so dllentry.o
dllist.o selftest.o sha1_st.o statemachine.o -L. -L/x86/lib
-L/x86/usr/lib
/usr/bin/usemsg -s __USAGENTO -s __USAGE /devewc/src/nto/clic/x86/so/libfs.so
…/…/
libfs.use /bin/true /devewc/src/nto/clic/x86/so/libfs.so

  • Took obj files from the build that used QNX makefile, and linked using
    following line, the
    library size is much small.

qcc -V gcc_ntox86 -DNTO_X86 -shared -Wl,–version-script=pto.qnx -Wl,-h
libfs.so
dllentry.o dllist.o selftest.o sha1_st.o statemachine.o -o …/lib/libfs.so

It appeared that the " link " did something different.

-Beth



Colin Burgess wrote:

Well, the rodata and text sections are much bigger, but I’m not sure how
the link could be causing that.

It could also be something different about the compile. I would try
using the objects from the QNX makefile build with the original link
command, see if it is still large.

Beth <> id@address.com> > wrote:
Colin, thanks for your help.

I will try to build it in the so directory. Here are two objdump -h from
both libs.

Large size lib output
libfs.so: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00000230 000000b4 000000b4 000000b4 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00000470 000002e4 000002e4 000002e4 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 00000d98 00000754 00000754 00000754 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 0000008e 000014ec 000014ec 000014ec 2
1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_d 00000038 0000157c 0000157c 0000157c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.data 00000178 000015b4 000015b4 000015b4 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.ctors 00000008 0000172c 0000172c 0000172c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .rel.dtors 00000008 00001734 00001734 00001734 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rel.got 00000128 0000173c 0000173c 0000173c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rel.plt 00000088 00001864 00001864 00001864 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 00000008 000018ec 000018ec 000018ec 20
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00000120 000018f4 000018f4 000018f4 2
2
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 00010d98 00001a14 00001a14 00001a14 22
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000008 000127ac 000127ac 000127ac 2
0
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00003ab1 000127c0 000127c0 000127c0 25
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .note0 00000000 00016271 00016271 00016271 2
0
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .data 00000a74 00017280 00017280 00016280 25
CONTENTS, ALLOC, LOAD, DATA
17 .ctors 0000000c 00017cf4 00017cf4 00016cf4 2
2
CONTENTS, ALLOC, LOAD, DATA
18 .dtors 0000000c 00017d00 00017d00 00016d00 22
CONTENTS, ALLOC, LOAD, DATA
19 .got 000000e4 00017d0c 00017d0c 00016d0c 2
2
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 000000a8 00017df0 00017df0 00016df0 22
CONTENTS, ALLOC, LOAD, DATA
21 .bss 000f4288 00017ea0 00017ea0 00016ea0 2
5
ALLOC
22 .comment 000002ac 00000000 00000000 00016ee8 20
CONTENTS, READONLY
23 .note 0000004c 00000000 00000000 00016e98 2
0
CONTENTS, READONLY
24 QNX_usage 000001d3 00000000 00000000 0001ac16 2**0
CONTENTS, READONLY

Small size output
libfs.so: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00000294 000000b4 000000b4 000000b4 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00000600 00000348 00000348 00000348 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 0000056d 00000948 00000948 00000948 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 000000c0 00000eb6 00000eb6 00000eb6 2
1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_d 00000038 00000f78 00000f78 00000f78 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.data 00000010 00000fb0 00000fb0 00000fb0 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.ctors 00000008 00000fc0 00000fc0 00000fc0 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .rel.dtors 00000008 00000fc8 00000fc8 00000fc8 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rel.got 00000028 00000fd0 00000fd0 00000fd0 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rel.plt 00000180 00000ff8 00000ff8 00000ff8 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 00000008 00001178 00001178 00001178 20
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00000310 00001180 00001180 00001180 2
2
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 00006ce8 00001490 00001490 00001490 22
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000008 00008178 00008178 00008178 2
0
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00000003 00008180 00008180 00008180 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .note0 00000000 00008183 00008183 00008183 2
0
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .data 00000914 000091a0 000091a0 000081a0 25
CONTENTS, ALLOC, LOAD, DATA
17 .ctors 0000000c 00009ab4 00009ab4 00008ab4 2
2
CONTENTS, ALLOC, LOAD, DATA
18 .dtors 0000000c 00009ac0 00009ac0 00008ac0 22
CONTENTS, ALLOC, LOAD, DATA
19 .got 000000e0 00009acc 00009acc 00008acc 2
2
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 000000a0 00009bac 00009bac 00008bac 22
CONTENTS, ALLOC, LOAD, DATA
21 .bss 000f4288 00009c60 00009c60 00008c60 2
5
ALLOC
22 .comment 00000260 00000000 00000000 00008c60 20
CONTENTS, READONLY
23 .note 00000140 00000000 00000000 00008ec0 2
0
CONTENTS, READONLY

Regards,
-Beth

Colin Burgess wrote:

Beth <> id@address.com> > wrote:
It might affect the lib size. How do I not to link with -Bsymbolic.

Build it in a nto/x86/so rather than nto/x86/dll directory.

Could you also post the results of objdump -h for both libs?


cburgess@qnx.com


cburgess@qnx.com

The last thing I would like to see is the mapfile. COuld you add -M to the
link stage of both?

Thanks,

Colin

Beth <id@address.com> wrote:

Here is what I did.

  • Changed dll directory to so directory, link with -Bsymbol. The library size
    didn’t change.
  • Took obj files from build that used conventional makefile, and link used QNX
    makefile,
    the library file size was still large.

/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibfs.so.1
-Wl,–version-script=/devewc/src/nto/clic/
pto.qnx -o/devewc/src/nto/clic/x86/so/libfs.so dllentry.o
dllist.o selftest.o sha1_st.o statemachine.o -L. -L/x86/lib
-L/x86/usr/lib
/usr/bin/usemsg -s __USAGENTO -s __USAGE /devewc/src/nto/clic/x86/so/libfs.so
…/…/
libfs.use /bin/true /devewc/src/nto/clic/x86/so/libfs.so

  • Took obj files from the build that used QNX makefile, and linked using
    following line, the
    library size is much small.

qcc -V gcc_ntox86 -DNTO_X86 -shared -Wl,–version-script=pto.qnx -Wl,-h
libfs.so
dllentry.o dllist.o selftest.o sha1_st.o statemachine.o -o …/lib/libfs.so

It appeared that the " link " did something different.

-Beth



Colin Burgess wrote:

Well, the rodata and text sections are much bigger, but I’m not sure how
the link could be causing that.

It could also be something different about the compile. I would try
using the objects from the QNX makefile build with the original link
command, see if it is still large.

Beth <> id@address.com> > wrote:
Colin, thanks for your help.

I will try to build it in the so directory. Here are two objdump -h from
both libs.

Large size lib output
libfs.so: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00000230 000000b4 000000b4 000000b4 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00000470 000002e4 000002e4 000002e4 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 00000d98 00000754 00000754 00000754 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 0000008e 000014ec 000014ec 000014ec 2
1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_d 00000038 0000157c 0000157c 0000157c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.data 00000178 000015b4 000015b4 000015b4 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.ctors 00000008 0000172c 0000172c 0000172c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .rel.dtors 00000008 00001734 00001734 00001734 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rel.got 00000128 0000173c 0000173c 0000173c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rel.plt 00000088 00001864 00001864 00001864 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 00000008 000018ec 000018ec 000018ec 20
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00000120 000018f4 000018f4 000018f4 2
2
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 00010d98 00001a14 00001a14 00001a14 22
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000008 000127ac 000127ac 000127ac 2
0
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00003ab1 000127c0 000127c0 000127c0 25
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .note0 00000000 00016271 00016271 00016271 2
0
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .data 00000a74 00017280 00017280 00016280 25
CONTENTS, ALLOC, LOAD, DATA
17 .ctors 0000000c 00017cf4 00017cf4 00016cf4 2
2
CONTENTS, ALLOC, LOAD, DATA
18 .dtors 0000000c 00017d00 00017d00 00016d00 22
CONTENTS, ALLOC, LOAD, DATA
19 .got 000000e4 00017d0c 00017d0c 00016d0c 2
2
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 000000a8 00017df0 00017df0 00016df0 22
CONTENTS, ALLOC, LOAD, DATA
21 .bss 000f4288 00017ea0 00017ea0 00016ea0 2
5
ALLOC
22 .comment 000002ac 00000000 00000000 00016ee8 20
CONTENTS, READONLY
23 .note 0000004c 00000000 00000000 00016e98 2
0
CONTENTS, READONLY
24 QNX_usage 000001d3 00000000 00000000 0001ac16 2**0
CONTENTS, READONLY

Small size output
libfs.so: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00000294 000000b4 000000b4 000000b4 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00000600 00000348 00000348 00000348 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 0000056d 00000948 00000948 00000948 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 000000c0 00000eb6 00000eb6 00000eb6 2
1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_d 00000038 00000f78 00000f78 00000f78 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.data 00000010 00000fb0 00000fb0 00000fb0 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.ctors 00000008 00000fc0 00000fc0 00000fc0 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .rel.dtors 00000008 00000fc8 00000fc8 00000fc8 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rel.got 00000028 00000fd0 00000fd0 00000fd0 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rel.plt 00000180 00000ff8 00000ff8 00000ff8 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 00000008 00001178 00001178 00001178 20
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00000310 00001180 00001180 00001180 2
2
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 00006ce8 00001490 00001490 00001490 22
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000008 00008178 00008178 00008178 2
0
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00000003 00008180 00008180 00008180 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .note0 00000000 00008183 00008183 00008183 2
0
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .data 00000914 000091a0 000091a0 000081a0 25
CONTENTS, ALLOC, LOAD, DATA
17 .ctors 0000000c 00009ab4 00009ab4 00008ab4 2
2
CONTENTS, ALLOC, LOAD, DATA
18 .dtors 0000000c 00009ac0 00009ac0 00008ac0 22
CONTENTS, ALLOC, LOAD, DATA
19 .got 000000e0 00009acc 00009acc 00008acc 2
2
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 000000a0 00009bac 00009bac 00008bac 22
CONTENTS, ALLOC, LOAD, DATA
21 .bss 000f4288 00009c60 00009c60 00008c60 2
5
ALLOC
22 .comment 00000260 00000000 00000000 00008c60 20
CONTENTS, READONLY
23 .note 00000140 00000000 00000000 00008ec0 2
0
CONTENTS, READONLY

Regards,
-Beth

Colin Burgess wrote:

Beth <> id@address.com> > wrote:
It might affect the lib size. How do I not to link with -Bsymbolic.

Build it in a nto/x86/so rather than nto/x86/dll directory.

Could you also post the results of objdump -h for both libs?


cburgess@qnx.com


cburgess@qnx.com


cburgess@qnx.com

Colin, thank you so much for helping me on this problem. Using the -M flag and
generate the map file
helped me identify where the problem is. I used EXTRA_SRCVPATH in my common.mk file
to add additional source for building the library. This will cause the compiler to
pick all the
source from that directory. However, I only need two files out of that path. When
using the
conventional makefile, it was specified what the source and object file to build.
That’s the
difference between these to library files.

My questions is how to specify the extra source files to build. I tried SRCS with a
list of
source files like the following:
SRCS = ./*.c $(PROJECT_ROOT)/…/2.2/clic.c

This doesn’t seem to work. It didn’t pick the clic.c and compile.

Very much appreciate your help.

-Beth



Colin Burgess wrote:

The last thing I would like to see is the mapfile. COuld you add -M to the
link stage of both?

Thanks,

Colin

Beth <> id@address.com> > wrote:
Here is what I did.

  • Changed dll directory to so directory, link with -Bsymbol. The library size
    didn’t change.
  • Took obj files from build that used conventional makefile, and link used QNX
    makefile,
    the library file size was still large.

/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibfs.so.1
-Wl,–version-script=/devewc/src/nto/clic/
pto.qnx -o/devewc/src/nto/clic/x86/so/libfs.so dllentry.o
dllist.o selftest.o sha1_st.o statemachine.o -L. -L/x86/lib
-L/x86/usr/lib
/usr/bin/usemsg -s __USAGENTO -s __USAGE /devewc/src/nto/clic/x86/so/libfs.so
…/…/
libfs.use /bin/true /devewc/src/nto/clic/x86/so/libfs.so

  • Took obj files from the build that used QNX makefile, and linked using
    following line, the
    library size is much small.

qcc -V gcc_ntox86 -DNTO_X86 -shared -Wl,–version-script=pto.qnx -Wl,-h
libfs.so
dllentry.o dllist.o selftest.o sha1_st.o statemachine.o -o …/lib/libfs.so

It appeared that the " link " did something different.

-Beth

Colin Burgess wrote:

Well, the rodata and text sections are much bigger, but I’m not sure how
the link could be causing that.

It could also be something different about the compile. I would try
using the objects from the QNX makefile build with the original link
command, see if it is still large.

Beth <> id@address.com> > wrote:
Colin, thanks for your help.

I will try to build it in the so directory. Here are two objdump -h from
both libs.

Large size lib output
libfs.so: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00000230 000000b4 000000b4 000000b4 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00000470 000002e4 000002e4 000002e4 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 00000d98 00000754 00000754 00000754 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 0000008e 000014ec 000014ec 000014ec 2
1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_d 00000038 0000157c 0000157c 0000157c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.data 00000178 000015b4 000015b4 000015b4 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.ctors 00000008 0000172c 0000172c 0000172c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .rel.dtors 00000008 00001734 00001734 00001734 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rel.got 00000128 0000173c 0000173c 0000173c 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rel.plt 00000088 00001864 00001864 00001864 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 00000008 000018ec 000018ec 000018ec 20
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00000120 000018f4 000018f4 000018f4 2
2
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 00010d98 00001a14 00001a14 00001a14 22
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000008 000127ac 000127ac 000127ac 2
0
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00003ab1 000127c0 000127c0 000127c0 25
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .note0 00000000 00016271 00016271 00016271 2
0
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .data 00000a74 00017280 00017280 00016280 25
CONTENTS, ALLOC, LOAD, DATA
17 .ctors 0000000c 00017cf4 00017cf4 00016cf4 2
2
CONTENTS, ALLOC, LOAD, DATA
18 .dtors 0000000c 00017d00 00017d00 00016d00 22
CONTENTS, ALLOC, LOAD, DATA
19 .got 000000e4 00017d0c 00017d0c 00016d0c 2
2
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 000000a8 00017df0 00017df0 00016df0 22
CONTENTS, ALLOC, LOAD, DATA
21 .bss 000f4288 00017ea0 00017ea0 00016ea0 2
5
ALLOC
22 .comment 000002ac 00000000 00000000 00016ee8 20
CONTENTS, READONLY
23 .note 0000004c 00000000 00000000 00016e98 2
0
CONTENTS, READONLY
24 QNX_usage 000001d3 00000000 00000000 0001ac16 2**0
CONTENTS, READONLY

Small size output
libfs.so: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00000294 000000b4 000000b4 000000b4 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00000600 00000348 00000348 00000348 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 0000056d 00000948 00000948 00000948 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 000000c0 00000eb6 00000eb6 00000eb6 2
1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_d 00000038 00000f78 00000f78 00000f78 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.data 00000010 00000fb0 00000fb0 00000fb0 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.ctors 00000008 00000fc0 00000fc0 00000fc0 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .rel.dtors 00000008 00000fc8 00000fc8 00000fc8 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rel.got 00000028 00000fd0 00000fd0 00000fd0 22
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rel.plt 00000180 00000ff8 00000ff8 00000ff8 2
2
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 00000008 00001178 00001178 00001178 20
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00000310 00001180 00001180 00001180 2
2
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 00006ce8 00001490 00001490 00001490 22
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 00000008 00008178 00008178 00008178 2
0
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00000003 00008180 00008180 00008180 20
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .note0 00000000 00008183 00008183 00008183 2
0
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .data 00000914 000091a0 000091a0 000081a0 25
CONTENTS, ALLOC, LOAD, DATA
17 .ctors 0000000c 00009ab4 00009ab4 00008ab4 2
2
CONTENTS, ALLOC, LOAD, DATA
18 .dtors 0000000c 00009ac0 00009ac0 00008ac0 22
CONTENTS, ALLOC, LOAD, DATA
19 .got 000000e0 00009acc 00009acc 00008acc 2
2
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 000000a0 00009bac 00009bac 00008bac 22
CONTENTS, ALLOC, LOAD, DATA
21 .bss 000f4288 00009c60 00009c60 00008c60 2
5
ALLOC
22 .comment 00000260 00000000 00000000 00008c60 20
CONTENTS, READONLY
23 .note 00000140 00000000 00000000 00008ec0 2
0
CONTENTS, READONLY

Regards,
-Beth

Colin Burgess wrote:

Beth <> id@address.com> > wrote:
It might affect the lib size. How do I not to link with -Bsymbolic.

Build it in a nto/x86/so rather than nto/x86/dll directory.

Could you also post the results of objdump -h for both libs?


cburgess@qnx.com


cburgess@qnx.com


cburgess@qnx.com

SRCS = ./*.c $(PROJECT_ROOT)/…/2.2/clic.c

Try

SRCS = $(wildcard $(PROJECT_ROOT)/*.c) $(PROJECT_ROOT)/…/2.2/clic.c


cburgess@qnx.com

That works. Thanks.
The EXTRA_SRCVPATH needs to be there as well.

-Beth

Colin Burgess wrote:

SRCS = ./*.c $(PROJECT_ROOT)/…/2.2/clic.c

Try

SRCS = $(wildcard $(PROJECT_ROOT)/*.c) $(PROJECT_ROOT)/…/2.2/clic.c


cburgess@qnx.com