'atexit' error when upgrading to xdctools 3.16 [message #630417] |
Fri, 01 October 2010 21:24  |
Eclipse User |
|
|
|
I'm having trouble building a simple hello world C program (app.x86U) that uses the System_printf() function from xdc.runtime.System. The program builds fine under xdctools 3.15.xx, but fails under 3.16.xx and 3.20.xx. (The host environment is Ubuntu 10.04.)
The error reads: System.c:(.text+0x8ec): undefined reference to `atexit'
There's also a warning about "linker.cmd contains output sections; did you forget -T?", but I'm not sure if this is the cause, or what it's really telling me to do.
This seems like a migration issue, but I can't seem to find any suggestions or warnings in the release notes.
The program is about as simple as it gets. A single call to System_printf(). It doesn't even use any arguments.
I dislike attaching long strings to emails, but I'm copying the full make listing in case it helps to decipher the problem.
Scott
-----
making package.mak (because of package.bld) ...
generating interfaces for package app_cfg (because package/package.xdc.inc is older than package.xdc) ...
configuring app_cfg.x86U from package/cfg/app_cfg_x86U.cfg ...
cl86U package/cfg/app_cfg_x86U.c ...
Configuro has completed; it's results are in app_cfg
/usr/bin/gcc -g -I" /home/user/ti-dvsdk_omap3530-evm_4_00_00_17/xdctools_3_16_03 _36/packages " -I" /home/user/ti-dvsdk_omap3530-evm_4_00_00_17/xdctools_3_16_03 _36/packages " -I"/home/user/omap/soln05c_x86_configuro/app/app_cfg/.." -isystem /usr/include -isystem /usr/lib/gcc/i486-linux-gnu/4.4.3/include -Dxdc_target_types__="gnu/targets/std.h" -Dxdc_target_name__=Linux86 -Dxdc_cfg__header__=" /home/user/omap/soln05c_x86_configuro/app/app_cfg/package/cf g/app_cfg_x86U.h " -c app.c -o app.o
/usr/bin/gcc -g -lstdc++ app.o app_cfg/linker.cmd -o app.x86U
/usr/bin/ld: warning: app_cfg/linker.cmd contains output sections; did you forget -T?
/home/user/ti-dvsdk_omap3530-evm_4_00_00_17/xdctools_3_16_03 _36/packages/gnu/targets/rts86U/lib/gnu.targets.rts86U.a86U( System.o86U): In function `xdc_runtime_System_Module_startup(void)':
System.c:(.text+0x8ec): undefined reference to `atexit'
collect2: ld returned 1 exit status
make: *** [app.x86U] Error 1
-----
|
|
|
|
|
Re: 'atexit' error when upgrading to xdctools 3.16 [message #754690 is a reply to message #630420] |
Thu, 03 November 2011 16:52   |
Eclipse User |
|
|
|
hello
i'm having the same problem as you, you mentioned that the workaround did the trick, but i don't have clear how you modify the file linkcmd.xdt i'm positng the way mi file looks, hopefully you can tell where to modify it, since i know this it's an old post, thanks in advance
%%{
/*
* Copyright (c) 2008 Texas Instruments and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* eclipse.org/legal/epl-v10.html
*
* Contributors:
* Texas Instruments - initial implementation
*
* */
/* Linker templates are passed the following arguments:
* $out - an open file stream for the generated linker
* command file
* $args[] - array of zero or more libraries that should be linked
* with (in the order they appear in the argument list)
*
* We can't add "'s around names; otherwise the GNU linker looks for names
* with "'s.
*
* The GNU linker accepts any text file as "command files", so there is no
* need to use a special option to identify them. In fact, if you use the
* -T option you must also include the default linker command file (which
* defines the memory map, sections, etc). By not using -T, this command
* file "accumulates" with the default.
*/
/* get the GNU compiler version from the version number returned by ITarget */
var VERSION = this.build.target.version.split(',')[2] - 0;
/* guess(!) the default leading prefix convention for this compiler */
var PREFIX = this.build.target.os == "Windows" ? "_" : "";
%%}
/* this file was generated by linkcmd.xdt from the gnu.targets package */
/* function aliases */
%if (prog.build.profile.match(/blas/) == null) {
% for (var keys = this.$$aliases.keys(); keys.hasMoreElements(); ) {
% var key = keys.nextElement();
`PREFIX + key` = `PREFIX + this.$$aliases.get(key)`;
% }
%}
%if ($args.length > 0) {
/* input libraries */
INPUT(
%for (var i = 0; i < $args.length; i++) {
"`$args[i]`"
%}
)
%}
%var _utils = xdc.loadCapsule("gnu/targets/linkUtils.xs");
%/* Mingw compilers do not work with the SECTIONS directive.
% */
%if (prog.build.target.$name != "gnu.targets.Mingw") {
SECTIONS {
`_utils.genSections(prog)`
}
%if (xdc.om['xdc.runtime.Text'].isLoaded != true) {
ASSERT(ADDR(xdc.noload) + SIZEOF(xdc.noload) < ADDR(.rodata)
|| ADDR(.rodata) + SIZEOF(.rodata) < ADDR(xdc.noload),
"Sections .rodata and xdc.noload overlap. See xdc.runtime.Text.isLoaded for more.")
%}
%} // end of the workaround for Mingw
%%{
/*
* @(#) gnu.targets; 1, 0, 1,370; 11-25-2009 10:23:05; /db/atree/library/trees/xdctargets/xdctargets-b28x/src/
*/
%%}
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04254 seconds