[#6128] libmudflap.c/fail18-frag.c test for excess errors fail

Document created by Aaronwu Employee on Oct 17, 2013
Version 1Show Document
  • View in full screen mode

[#6128] libmudflap.c/fail18-frag.c test for excess errors fail

Submitted By: Vivi Li

Open Date

2010-07-15 06:39:57     Close Date

2011-01-20 02:35:24

Priority:

Medium     Assignee:

Vivi Li

Stuart Henderson

Board:

N/A     Silicon Revision:

Resolution:

Fixed     Fixed In Release:

N/A

Processor:

ALL     

Host Operating System:

toolchain rev.:

    kernel rev.:

State:

Closed     Found In Release:

N/A

Is this bug repeatable?:

N/A     

Summary: libmudflap.c/fail18-frag.c test for excess errors fail

Details:

 

libmudflap.c/fail18-frag.c test for excess errors fail. Not a regression bug.

 

--

FAIL: libmudflap.c/fail18-frag.c (test for excess errors)

FAIL: libmudflap.c/fail18-frag.c (-static) (test for excess errors)

FAIL: libmudflap.c/fail18-frag.c (-O2) (test for excess errors)

FAIL: libmudflap.c/fail18-frag.c (-O3) (test for excess errors)

--

 

example of log:

--

bfin-linux-uclibc-gcc -ggdb3 -DDEBUG_ASSERT -I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite -I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite/.. -I.. -L/.libs /home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite/libmudflap.c/fail18-frag.c -fmudflap -lmudflap -L/testsuite -ldl -lm -mcpu=bf537-0.2 -o ./fail18-frag.exe

 

/tmp/ccEqsmYS.o: In function `main':

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite/libmudflap.c/fail18-frag.c:9: undefined reference to `__mf_lc_mask'

/tmp/ccEqsmYS.o: In function `_GLOBAL__I_00099_0_main':

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libmudflap/testsuite/libmudflap.c/fail18-frag.c:12: undefined reference to `__mf_lc_mask'

collect2: ld returned 1 exit status

compiler exited with status 1

 

FAIL: libmudflap.c/fail18-frag.c (test for excess errors)

--

 

Follow-ups

 

--- Stuart Henderson                                         2010-09-09 06:43:49

The test checks to make sure we can't write to the no-access var __mf_lc_mask

through an asm:

extern unsigned foo __asm__ ("__mf_lc_mask");

but on blackfin the asm symbol will be triple underscore.

 

I'm not sure what the etiquette would be for such a change.  would the

following be acceptable upstream?

 

#ifdef __ADSPBLACKFIN__

extern unsigned foo __asm__ ("___mf_lc_mask");

#else

extern unsigned foo __asm__ ("__mf_lc_mask");

#endif

 

--- Mike Frysinger                                           2010-09-09 12:47:38

gcc will always define __USER_LABEL_PREFIX__ for a target.  unfortunately, ive

only found triple indirection to work so far in expanding it into a string:

 

#define __C_SYM(pfx, sym) #pfx sym

#define _C_SYM(pfx, sym) __C_SYM(pfx, sym)

#define C_SYM(sym) _C_SYM(__USER_LABEL_PREFIX__, sym)

 

extern unsigned foo __asm__ (C_SYM("__mf_lc_mask"));

 

but this should work across all gcc targets

 

--- Stuart Henderson                                         2010-09-10 10:15:44

interesting.  we can move __USER_LABEL_PREFIX__ into the first macro call and

save ourselves a define, but other than that I can't see a better way of doing

it.  thanks.

 

#define _C_SYM(pfx, sym) #pfx sym

#define C_SYM(pfx, sym) _C_SYM(pfx, sym)

 

extern unsigned foo __asm__

(C_SYM(__USER_LABEL_PREFIX__,"__mf_lc_mask"));

 

--- Mike Frysinger                                           2010-09-10 12:41:28

yes, that'd save a step.  typically though, C_SYM() is a macro in a common

include that takes one argument and hides the rest of the details which is why

triple indirection is needed.  if this isnt going to be shared though, i guess

it isnt necessary.

 

--- Vivi Li                                                  2010-09-29 03:52:47

Need to check test result in trunk.

 

--- Vivi Li                                                  2011-01-20 02:35:24

OK now.

Close it.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes