2014-03-08 19:56:21 -05:00
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
|
|
#if defined(__GNUC__) && defined(__ELF__)
|
|
|
|
|
#define __page(x) __attribute__ (( __section__ (x) ))
|
|
|
|
|
#else
|
|
|
|
|
#define __page(x) /* nothing */
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#define S(x) x,sizeof(x)
|
|
|
|
|
|
2018-03-13 02:39:29 +01:00
|
|
|
#if 0
|
|
|
|
|
*(.text.e) /* RARE */
|
|
|
|
|
*(.text.d) /* INIT */ main
|
|
|
|
|
*(.text.b) /* CFG1 */ func2
|
|
|
|
|
*(.text.c) /* CMD1 */ func1
|
|
|
|
|
*(.text.a) /* CORE */
|
|
|
|
|
*(.text.f) /* DBUG */
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
__page(".text.c")
|
2014-03-08 19:56:21 -05:00
|
|
|
int function1(int a)
|
|
|
|
|
{
|
|
|
|
|
return a + 1;
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-13 02:39:29 +01:00
|
|
|
__page(".text.b")
|
2014-03-08 19:56:21 -05:00
|
|
|
int function2(int a)
|
|
|
|
|
{
|
|
|
|
|
return a + 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
__page(".text.d")
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
|
{
|
2018-03-13 02:39:29 +01:00
|
|
|
if (((void*)main < (void*)function2) && ((void*)function2 < (void*)function1))
|
2014-03-08 19:56:21 -05:00
|
|
|
write(1,S("yes\n"));
|
|
|
|
|
else
|
|
|
|
|
write(1,S("no\n"));
|
|
|
|
|
return(0);
|
|
|
|
|
}
|