Revision tags: v24.07-rc2 |
|
#
e1d8a879 |
| 11-Jul-2024 |
David Marchand <david.marchand@redhat.com> |
buildtools: fix build with clang 17 and ASan
ASan included in clang 17 and later suffixes symbols. $ nm build/drivers/libtmp_rte_net_null.a | grep this_pmd 0000000000000000 r this_pmd_name3 00000000
buildtools: fix build with clang 17 and ASan
ASan included in clang 17 and later suffixes symbols. $ nm build/drivers/libtmp_rte_net_null.a | grep this_pmd 0000000000000000 r this_pmd_name3 0000000000000000 n this_pmd_name3.f2cd16678ab09dba8fd23405d8d11fce
This breaks the detection of driver symbols in pmdinfogen which then creates duplicate symbols "_pmd_info" in many drivers. Such duplicate symbols trigger a link error.
$ grep -w _pmd_info build/drivers/rte_net_*.pmd.c build/drivers/rte_net_af_packet.pmd.c:const char _pmd_info[] __attribute__((used)) = "PMD_INFO_STRING= {\"name\": \"\", \"pci_ids\": []}"; build/drivers/rte_net_null.pmd.c:const char _pmd_info[] __attribute__((used)) = "PMD_INFO_STRING= {\"name\": \"\", \"pci_ids\": []}";
A simple reproducer: $ CC=clang meson setup build -Denable_apps=test-pmd -Ddisable_libs=* \ -Denable_drivers=net/null,net/af_packet -Dtests=false \ -Db_lundef=false -Db_sanitize=address
$ ninja -C build
Before this patch, the pmdinfogen script was relying on a symbol name starting with this_pmd_name. On the other hand, what this script needs is symbols whose names are this_pmd_name ## __COUNTER__, see below an example for PCI driver symbols (the same applies to other buses).
$ git grep -w RTE_PMD_EXPORT_NAME drivers/bus/pci/bus_pci_driver.h drivers/bus/pci/bus_pci_driver.h:RTE_PMD_EXPORT_NAME(nm, __COUNTER__) $ git grep -B1 this_pmd_name lib/eal/ lib/eal/include/rte_dev.h-#define RTE_PMD_EXPORT_NAME(name, idx) \ lib/eal/include/rte_dev.h:static const char RTE_PMD_EXPORT_NAME_ARRAY(this_pmd_name, idx) \ $ git grep define.RTE_PMD_EXPORT_NAME_ARRAY lib/eal/include/rte_dev.h lib/eal/include/rte_dev.h:#define RTE_PMD_EXPORT_NAME_ARRAY(n, idx) n##idx[]
Adjust the symbol filter for both ELF and COFF implementations.
Bugzilla ID: 1466 Cc: stable@dpdk.org
Reported-by: Ali Alnubani <alialnu@nvidia.com> Reported-by: Song Jiale <songx.jiale@intel.com> Signed-off-by: David Marchand <david.marchand@redhat.com> Tested-by: Song Jiale <songx.jiale@intel.com>
show more ...
|
Revision tags: v24.07-rc1, v24.03, v24.03-rc4, v24.03-rc3, v24.03-rc2, v24.03-rc1, v23.11, v23.11-rc4, v23.11-rc3, v23.11-rc2, v23.11-rc1, v23.07, v23.07-rc4, v23.07-rc3, v23.07-rc2, v23.07-rc1, v23.03, v23.03-rc4, v23.03-rc3, v23.03-rc2, v23.03-rc1, v22.11, v22.11-rc4, v22.11-rc3, v22.11-rc2, v22.11-rc1, v22.07, v22.07-rc4, v22.07-rc3, v22.07-rc2, v22.07-rc1, v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1, v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, v21.11-rc1, v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1 |
|
#
8050b615 |
| 27-May-2021 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
buildtools: allow string constant padding
Size of string constant symbol may be larger than its length measured up to NUL terminator. In this case pmdinfogen included padding bytes after NUL termina
buildtools: allow string constant padding
Size of string constant symbol may be larger than its length measured up to NUL terminator. In this case pmdinfogen included padding bytes after NUL terminator in generated source, yielding incorrect code.
Always trim string data to NUL terminator while reading ELF. It was already done for COFF because there's no symbol size.
Bugzilla ID: 720 Fixes: f0f93a7adfee ("buildtools: use Python pmdinfogen") Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
show more ...
|
Revision tags: v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2, v21.05-rc1, v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2 |
|
#
65ef14c5 |
| 25-Jan-2021 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
buildtools: fix pmdinfogen with pyelftools < 0.24
pyelftools had some breaking changes [1] and API enhancements [2] between 0.23 (used in Ubuntu 16.04) and 0.24. Ensure compatibility with both legac
buildtools: fix pmdinfogen with pyelftools < 0.24
pyelftools had some breaking changes [1] and API enhancements [2] between 0.23 (used in Ubuntu 16.04) and 0.24. Ensure compatibility with both legacy and modern versions.
[1]: https://github.com/eliben/pyelftools/pull/76 [2]: https://github.com/eliben/pyelftools/pull/56
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
show more ...
|
Revision tags: v21.02-rc1 |
|
#
e6e9730c |
| 08-Jan-2021 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
buildtools: support object file extraction for Windows
clang archiver tool is llvm-ar on Windows and ar on other platforms. MinGW always uses ar. Replace shell script (Unix-only) that calls ar with
buildtools: support object file extraction for Windows
clang archiver tool is llvm-ar on Windows and ar on other platforms. MinGW always uses ar. Replace shell script (Unix-only) that calls ar with a Python script (OS-independent) that calls an appropriate archiver tool selected at configuration time. Move the logic not to generate empty sources into pmdinfogen.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
show more ...
|
#
0fe5c4e5 |
| 08-Jan-2021 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
buildtools: allow multiple input files in pmdinfogen
Process any number of input object files and write a unified output.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
|
#
5031436f |
| 08-Jan-2021 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
buildtools: support COFF in pmdinfogen
Common Object File Format (COFF) is used on Windows in place of ELF.
Add COFF parser to pmdinfogen. Also add an argument to specify input file format, which i
buildtools: support COFF in pmdinfogen
Common Object File Format (COFF) is used on Windows in place of ELF.
Add COFF parser to pmdinfogen. Also add an argument to specify input file format, which is selected at configure time based on the target.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
show more ...
|
#
6c4bf8f4 |
| 24-Jan-2021 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
buildtools: add Python pmdinfogen
Using a high-level, interpreted language simplifies maintenance and build process. Furthermore, ELF handling is delegated to pyelftools package. Original logic is k
buildtools: add Python pmdinfogen
Using a high-level, interpreted language simplifies maintenance and build process. Furthermore, ELF handling is delegated to pyelftools package. Original logic is kept, the copyright recognizes that.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Tested-by: Jie Zhou <jizh@microsoft.com>
show more ...
|