IBM Support

LI75091: MULTIPLE PRAGMA COMMENTS EXCEEDED LINKER LIMIT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following perl script will generate a cpp file that contains
    6500 pragma comment strings with each 17 characters long.
    
    <perl>
    #!/usr/bin/perl -w
    
    use strict;
    
    open(COMMENT_SOURCE, ">comment.cpp");
    for(my $i=0; $i<6_500; ++$i) {
        print COMMENT_SOURCE qq{#pragma comment(user, "This is
    comment $i")\n};
    }
    print COMMENT_SOURCE <<MAIN;
    int main()
    {
        return 0;
    }
    MAIN
    </perl>
    
    The generated comment.cpp looks like this:
    
    #pragma comment(user, "This is comment 0")
    #pragma comment(user, "This is comment 1")
    .....
    
    int main() {return 0;}
    
    Once it's executed, building comment.cpp
    
    $xlC comment.cpp
    
    ld: 0711-950 ERROR: A name is too long.
            Names longer than 65535 characters are truncated.
            The name begins: This is comment 0This is comment 1This
    is com
    

Local fix

  • N/A
    

Problem summary

  • USER AFFECTED:
    Users of #pragma comment
    
    PROBLEM DESCRIPTION:
    
    "ld: 0711-950 ERROR: A name is too long.  Names longer than
    65535 characters are truncated. The name begins: This is comment
    0This is comment 1This is com"
    
    pragam comment user concatenates the strings together and in
    this case hit the limit for the size of a name for a single
    symbol.
    

Problem conclusion

  • Create another comment symbol to handle the overflow,  i.e. made
    the compiler always generate linker acceptable symbols for any
    size name string
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI75091

  • Reported component name

    XL C/C++ RHEL52

  • Reported component ID

    5724U8310

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-12-01

  • Closed date

    2009-12-01

  • Last modified date

    2009-12-01

  • APAR is sysrouted FROM one or more of the following:

    IZ52400

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL C/C++ RHEL52

  • Fixed component ID

    5724U8310

Applicable component levels

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"A.1","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
14 October 2021