Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[x86/Linux] Add missing files in x86/Linux PAL #8318

Merged
merged 3 commits into from
Nov 30, 2016

Conversation

parjong
Copy link

@parjong parjong commented Nov 28, 2016

This commit attempts to (partially) enable x86/Linux PAL Layer.

Currently, only exception_handling.pal_sxs.test1.paltest_pal_sxs_test1 fails with this commit.

@parjong parjong changed the title (Partially) Enable x86/Linux PAL [x86/Linux] (Partially) Enable x86/Linux PAL Nov 28, 2016
@parjong
Copy link
Author

parjong commented Nov 28, 2016

CC @seanshpark

@parjong parjong changed the title [x86/Linux] (Partially) Enable x86/Linux PAL [x86/Linux] Add missing files in x86/Linux PAL Nov 28, 2016
@parjong
Copy link
Author

parjong commented Nov 29, 2016

@janvorli @jkotas Please take a look.

.macro NESTED_ENTRY Name, Section, Handler
LEAF_ENTRY \Name, \Section
.ifnc \Handler, NoHandler
.cfi_personality 0, C_FUNC(\Handler) // 0 == DW_EH_PE_absptr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just fixed the personality routine address encoding for amd64 and arm64. This was causing a TEXTREL. Please use the new way:
.cfi_personality 0x1b, C_FUNC(\Handler) // 0x1b == DW_EH_PE_pcrel | DW_EH_PE_sdata4

@@ -7,6 +7,7 @@ set(CMAKE_SYSTEM_PROCESSOR i686)
add_compile_options("-m32")
add_compile_options("--sysroot=${CROSS_ROOTFS}")
add_compile_options("-Wno-error=unused-command-line-argument")
add_compile_options("-Wno-missing-prototype-for-cc")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where was the warning reported? I would prefer fixing it instead of hiding it unless it happens on too many places.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the error reported when this option is not provided:

/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:334:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_IsDebuggerPresent();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:510:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_InitializeDLL();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:584:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_NotifyRuntimeStarted();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:3254:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_GetStackBase();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:3259:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_GetStackLimit();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:3264:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_GetLogicalCpuCountFromOS();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:3269:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_GetLogicalProcessorCacheSizeFromOS();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:4904:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
GetTickCount64();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:5344:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
GetCurrentProcessorNumber();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:5356:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_HasGetCurrentProcessorNumber();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:5442:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
FlushProcessWriteBuffers();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:6305:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_HasEntered();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:6312:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_EnterTop();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:6347:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_LeaveBottom();
^
/home/parjong/projects/dotnet/coreclr/src/pal/inc/pal.h:6354:1: error: function with no prototype cannot use the stdcall calling convention [-Werror,-Wmissing-prototype-for-cc]
PAL_LeaveTop();
^

Copy link
Member

@janvorli janvorli Nov 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have googled for the error. It looks like the compiler requires the function prototypes with no parameters to use "void" in the parents. Could you please try to add that to see if it silences the warnings?

@janvorli
Copy link
Member

LGTM, thank you!

@janvorli janvorli merged commit fc46f78 into dotnet:master Nov 30, 2016
@parjong parjong deleted the wip/x86_pal branch November 30, 2016 23:13
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* (Partially) Enable x86/Linux PAL

* Fix personality routine address encoding

* Fix build warnings


Commit migrated from dotnet/coreclr@fc46f78
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants