ARM Technical Support Knowledge Articles

What does "Warning L6932W: Library reports warning: use of helper library h_xx.l is deprecated" mean?

Applies to: RealView Development Suite (RVDS)

Scenario

When using RVCT 4.0, you may see the following compiler warning:

Warning: L6932W: Library reports warning: use of helper library h_xx.l is deprecated

Answer

One reason for a helper library to be pulled in is that some object files reference __ARM_switch8. It is possible to find this out by looking at the linker's verbose output (armlink --verbose), for example:

Loading member object1.o from lib1.a.
              reference :  strncmp
              reference :  __ARM_switch8

__ARM_switch8 is a helper function. Before RVCT 4.0, helper functions like this reside in helper library files such as h_tf.l. (All helper library file names start with h_).

RVCT 4.0 now no longer requires helper libraries. Instead, all helper functions are generated by the compiler and become part of an object file. The linker verbose output may show something similar to:

Loading member object2.o from lib2.a.
              ...
              definition:  __ARM_common_switch8_thumb

As shown above, the helper function __ARM_common_switch8_thumb is in the object object2.o, rather than a helper library.

So if you are linking using RVCT 4.0 and getting warning message L6932W, it is likely that you are linking with objects/libraries that are built with RVCT 3.1, not RVCT 4.0.

A side point about why compiler generates calls to __ARM_switch8

__ARM_switch8 is a compiler "helper" function providing a small code-size implementations of C switch/case statements in Thumb. If you do not want the compiler (RVCT 3.1 or earlier) to generate such calls, you can compile your code for speed rather than size with -Otime, or individual functions with the "#pragma Otime" directive. Your code will then probably be a little larger overall, but will no longer contain calls to __ARM_switch8.

The example below results in the helper function __ARM_switch8 being pulled in from the helper libraries.

extern void get_id (unsigned short *);
extern void func1 (void);
extern void func2 (void);
extern void func3 (void);
extern void func4 (void);
extern void func5 (void);

void sample ()
{
  unsigned short id;
  while (1)
  {    
    get_id (&id);
   
    switch (id)
    {
      case 0x100:
          func1 ();
          break;
      case 0x101:
          func2 ();
          break;
      case 0x102:
          func3 ();
          break;
      case 0x103:
          func4 ();
          break;
      case 0x104:
          func5 ();
          break;
      default:
          break;
    }
  }
}

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential