hotspot/test/runtime/execstack/libtest-rw.c
author gthornbr
Fri, 15 Jul 2016 10:25:16 -0700
changeset 39972 2c3c3b7c20d2
permissions -rw-r--r--
8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc Reviewed-by: cjplummer, dcubed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39972
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
     1
/*
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
     2
 * Copyright (c) 2002-2016, Oracle and/or its affiliates. All rights reserved.
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
     3
 * Copyright (c) 2011 SAP AG.  All Rights Reserved.
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
     5
 *
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
     8
 * published by the Free Software Foundation.
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
     9
 *
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    14
 * accompanied this code).
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    15
 *
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    19
 *
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    22
 * questions.
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    23
 */
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    24
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    25
/*
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    26
 * This source file is the same as libtest-rwx.c and needs to be a separate
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    27
 * file so it can be built with "-z noexecstack" by the build process.
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    28
 * If any changes are made they probably also need to be made to libtest-rwx.c.
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    29
 */
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    30
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    31
#include <stdlib.h>
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    32
#include <string.h>
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    33
#include <stdio.h>
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    34
#include "jni.h"
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    35
#ifdef __cplusplus
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    36
extern "C" {
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    37
#endif
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    38
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    39
JNIEXPORT jint JNICALL Java_Test_someMethod(JNIEnv *env, jobject mainObject) {
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    40
  return 3;
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    41
}
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    42
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    43
#ifdef __cplusplus
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    44
}
2c3c3b7c20d2 8081770: [TESTBUG] regression Test7107135 needs to remove dependence on locally installed gcc
gthornbr
parents:
diff changeset
    45
#endif