Thread (62 messages) 62 messages, 5 authors, 2016-06-13

Re: [PATCH 2/2] mk: reduce scope of whole-archive to pmd libraries

From: Thomas Monjalon <hidden>
Date: 2016-06-10 10:18:31

2016-06-10 10:57, Ferruh Yigit:
On 6/10/2016 10:03 AM, Thomas Monjalon wrote:
quoted
2016-05-27 17:48, Ferruh Yigit:
quoted
--whole-archive argument only required for pmd libraries, and currently
it covers more libraries. Reducing scope of the argument to pmd
libraries slightly reduce final application size.
In my understanding, --whole-archive is required for static libraries used
by plugins:
	http://dpdk.org/commit/20afd76a
Right, required for static libraries. But more than used by plugins,
required for plugin to work.
quoted
If we want to restrict it, I would say it must be around EAL, ring,
mbuf, mempool, ethdev, cryptodev, etc.
We should restrict to plugins. What happens is, since there is no direct
call to PMDs from application, PMD code is not included into final
application. To force PMDs to be included into final binary,
--whole-archive is required.

But --whole-archive is not required for other libraries, and just cause
unnecessary increase in binary size.
Yes it is necessary for other libraries, otherwise some symbols needed by
plugins won't be available.
Example:
In function `rte_pmd_af_packet_devuninit':
rte_eth_af_packet.c:(.text+0x8bf): undefined reference to `rte_eth_dev_allocated'
rte_eth_af_packet.c:(.text+0x930): undefined reference to `rte_eth_dev_release_port'
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help