This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] [MIPS] Raise highest supported EI_ABIVERSION value


On Fri, 16 Aug 2019, Mihailo Stojanovic wrote:

> New testcase doesn't actually check the value of the symbol, it just
> makes sure that it is executed without "ABI version invalid" error.

The test also doesn't execute the load of the symbol address from the GOT 
at all (the load is after the return from the function - because it 
doesn't use ".set noreorder", the assembler puts a nop in the branch delay 
slot).  Is that intentional?  And for n32 / n64 it doesn't set up the $gp 
address either (.cpload doesn't do anything for non-o32 ABIs), which in 
this case is harmless because the load isn't executed.

I.e., the test does in fact verify the library is loaded without error, 
and does pass for all three ABIs, but if it's intended that the address 
doesn't get loaded and $gp doesn't get set up for the load for n32 / n64, 
there ought to be comments saying this is deliberate.

> +++ b/sysdeps/mips/tst-undefined-weak-lib.S
> @@ -0,0 +1,33 @@
> +/* Copyright (C) 2019 Free Software Foundation, Inc.

Files should start with a one-line comment above the copyright notice 
(saying what this is testing, or something like that).

As noted, a bug should be filed in Bugzilla for this issue (then the 
comments could give the bug number, as well as putting [BZ #N] in the 
ChangeLog entry).

> +#define TEST_FUNCTION do_test ()
> +#include "../../test-skeleton.c"

The modern approach for tests is to use <support/test-driver.c> rather 
than defining TEST_FUNCTION and using test-skeleton.c.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]