Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: Dynamic libs (--linux, --pic) and linker command files

$
0
0

Hi All,

I am creating a dynamic library with options --linux, --pic=far --dbst. While compiling if i add a linker command file along with the build the elf file generated is not a valid one. it has the following errors

  • One of the program headers PT_LOAD has memory size  as 0 and file size as non-zero number
  • The dynamic symbol table offset (DT_SYMTAB) present in the dynamic header is set to 0
  • The values of the offset in the section headers though are the correct ones.

All of these errors goes away as soon as i exclude the linker.cmd file from the build. The 2 generated elf files are compared using ofd6x.exe, there is a lot of difference between them including the program headers. The elf file generated without linker.cmd has the PT_INTERP & PT_PHDR sections which is missing in the elf file generated with the linker.cmd. I have attached the main.c that i am trying to compile along with the linker.cmd.(Please visit the site to view this file)(Please visit the site to view this file)

command lines options are

"C:/Tools/TI/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x" -mv6740 --abi=eabi -g --dsbt --pic=far --linux -z -i"C
:/Tools/TI/ccsv5/tools/compiler/c6000_7.4.4/lib" -i"C:/Tools/TI/ccsv5/tools/compiler/c6000_7.4.4/include" --export=AnalyticsProcess --export=AnalyticsCreate --export=AnalyticsControl --export=AnalyticsDestruct --bind_now --dynamic=lib -o "DynamicLib.dll"  "./main.obj" "../linker.cmd"

Can anyone shed some light on why the linker.cmd file is causing the compiler to generate such different elf files ? Please note I need the linker cmd file for grouping various DATA_SECTIONS present in the code. I am on 8127 and with complier version 7.4.4

Regards

Krishna


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>