~/nacl_sdk/pepper_18/tools/sel_ldr_x86_64 -f hello_world_x86_64.nexe
Linux ip-10-168-221-158 3.0.0-16-virtual #28-Ubuntu SMP Fri Jan 27 18:22:35 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[11757,2614712160:05:53:22.284542] Native Client module will be loaded at base address 0x00007fc700000000Segmentation fault
[11801,2437584736:06:02:41.906677] NaClPerfCounterInterval(SelMain __start__:SnapshotNaclFile): 2250 microsecs[11801,2437584736:06:02:41.907013] NaClPerfCounterInterval(NaClAppLoadFile __start__:PreAllocAddrSpace): 37 microsecs[11801,2437584736:06:02:41.907214] Native Client module will be loaded at base address 0x00007fe400000000[11801,2437584736:06:02:41.907392] NaClPerfCounterInterval(NaClAppLoadFile PreAllocAddrSpace:*AllocAddrSpace): 377 microsecs[11801,2437584736:06:02:41.912955] NaClPerfCounterInterval(NaClAppLoadFile *AllocAddrSpace:*MakeDynText): 5563 microsecs[11801,2437584736:06:02:41.924381] NaClPerfCounterInterval(NaClAppLoadFile *MakeDynText:*ValidateImg): 11427 microsecs[11801,2437584736:06:02:41.924939] NaClPerfCounterInterval(NaClAppLoadFile __start__:EndLoadFile): 17963 microsecs[11801,2437584736:06:02:41.925112] NaClPerfCounterInterval(SelMain SnapshotNaclFile:AppLoadEnd): 18437 microsecsprinting NaClApp detailsNaClAppPrintDetails((struct NaClApp *) 0x7ffff09a1670,(struct Gio *) 0x7ffff09a1640)addr space size: 2**32stack size: 0x01000000mem start addr: 0x7fe400000000static_text_end: 0x00050000end-of-text: 0x00050000rodata: 0x10020000data: 0x10040000data_end: 0x10041e48break_addr: 0x10041e48ELF initial entry point: 0x0002c040ELF user entry point: 0x00000000memory map:Page 0 (0x0)npages 16 (0x10)start vaddr 0x0end vaddr 0x10000prot 0x00000000not shared/backed by a filePage 16 (0x10)npages 64 (0x40)start vaddr 0x10000end vaddr 0x50000prot 0x00000005not shared/backed by a filePage 80 (0x50)npages 65488 (0xffd0)start vaddr 0x50000end vaddr 0x10020000prot 0x00000005shared/backed by a filePage 65568 (0x10020)npages 32 (0x20)start vaddr 0x10020000end vaddr 0x10040000prot 0x00000001not shared/backed by a filePage 65600 (0x10040)npages 16 (0x10)start vaddr 0x10040000end vaddr 0x10050000prot 0x00000003not shared/backed by a filePage 1044480 (0xff000)npages 4096 (0x1000)start vaddr 0xff000000end vaddr 0x100000000prot 0x00000003not shared/backed by a file[11801,2437584736:06:02:41.931800] NaClPerfCounterInterval(SelMain AppLoadEnd:AppPrepLaunch): 6688 microsecs[11801,2437584736:06:02:41.932009] NACL: Application output follows[11801,2437584736:06:02:41.932391] NaClPerfCounterInterval(SelMain AppPrepLaunch:CreateMainThread): 589 microsecsSegmentation fault
~/nacl_sdk/pepper_18/tools/ncval_x86_64 hello_world_x86_64.nexe
VALIDATOR: segment[0] p_type 6 p_offset 0 vaddr 0 paddr 0 align 8VALIDATOR: filesz 120 memsz 120 flags 4VALIDATOR: segment[1] p_type 1 p_offset 10000 vaddr 20000 paddr 20000 align 65536VALIDATOR: filesz 206c0 memsz 206c0 flags 5VALIDATOR: parsing segment 1VALIDATOR: 200cc: Does not support LM feature, removing usage(s).VALIDATOR: 2062c: Does not support CMOV feature, removing usage(s).VALIDATOR: 230ef: Does not support SSE2 feature, removing usage(s).VALIDATOR: 2c422: Does not support SSE feature, removing usage(s).VALIDATOR: 2c7d0: Does not support MMX feature, removing usage(s).VALIDATOR: 2c8fc: Does not support CLFLUSH feature, removing usage(s).VALIDATOR: 2c8fc: Does not support SFENCE feature, removing usage(s).VALIDATOR: Checking block alignment and jump targets: 20000 to 406c0VALIDATOR: segment[2] p_type 1 p_offset 40000 vaddr 10020000 paddr 10020000 align 65536VALIDATOR: filesz 10474 memsz 10474 flags 4VALIDATOR: segment[3] p_type 1 p_offset 60000 vaddr 10040000 paddr 10040000 align 65536VALIDATOR: filesz 6a8 memsz 1e48 flags 6*** hello_world_x86_64.nexe is safe ****** hello_world_x86_64.nexe is safe ***
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "ppapi/c/pp_errors.h"#include "ppapi/c/pp_module.h"#include "ppapi/c/pp_var.h"#include "ppapi/c/ppb.h"#include "ppapi/c/ppb_instance.h"#include "ppapi/c/ppb_messaging.h"#include "ppapi/c/ppb_var.h"#include "ppapi/c/ppp.h"#include "ppapi/c/ppp_instance.h"#include "ppapi/c/ppp_messaging.h"static PP_Bool Instance_DidCreate(PP_Instance instance, uint32_t argc, const char* argn[], const char* argv[]){return PP_TRUE;}static void Instance_DidDestroy(PP_Instance instance){}static void Instance_DidChangeView(PP_Instance instance, PP_Resource view_resource){}static void Instance_DidChangeFocus(PP_Instance instance, PP_Bool has_focus){}static PP_Bool Instance_HandleDocumentLoad(PP_Instance instance, PP_Resource url_loader){/* NaCl modules do not need to handle the document load function. */return PP_FALSE;}PP_EXPORT int32_t PPP_InitializeModule(PP_Module a_module_id, PPB_GetInterface get_browser){return PP_OK;}PP_EXPORT const void* PPP_GetInterface(const char* interface_name){if (strcmp(interface_name, PPP_INSTANCE_INTERFACE) == 0) {static PPP_Instance instance_interface = {&Instance_DidCreate,&Instance_DidDestroy,&Instance_DidChangeView,&Instance_DidChangeFocus,&Instance_HandleDocumentLoad,};return &instance_interface;}return NULL;}/*** Called before the plugin module is unloaded.*/PP_EXPORT void PPP_ShutdownModule() {}
The pepper interfaces are implemented by proxying calls to the browser. Standalone sell_ldr won't be useful for that. You'll have to create an nmf file and load the nexe via chrome.
As for the seg fault, it's probably because the IRT isn't being loaded. No need to worry about it -- when you test via the browser, that's taken care of.
-bsy
plz xqz tpos, rplyng by fone
--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/native-client-discuss/-/YGs2aj7GY1EJ.
To post to this group, send email to native-cli...@googlegroups.com.
To unsubscribe from this group, send email to native-client-di...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/native-client-discuss?hl=en.
#include <stdio.h>intmain( void ){printf("hello, world.");return (0);}
~/nacl_sdk/pepper_18/tools/sel_ldr_x86_64 -f hello_world_x86_64.nexe[17871,1502443360:09:13:49.017232] Native Client module will be loaded at base address 0x00007fd700000000
As for the seg fault, it's probably because the IRT isn't being loaded. No need to worry about it -- when you test via the browser, that's taken care of.
~/nacl_sdk/pepper_18/tools/sel_ldr_x86_64 -f hello_world_x86_64.nexe[18912,2253166432:10:13:23.718015] Native Client module will be loaded at base address 0x00007f3800000000Segmentation fault
Add a -B flag with arg the path to the integrated runtime IRT which is untrusted code injected into the addr space that provides the stable ABI that libc etc uses. The path is, if you are building sell_ldr from the sources, something like scons-out/.. /something-irt/.../*irt.nexe. Not sure where it is in the SDK.
plz xqz tpos, rplyng by fone
--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/native-client-discuss/-/dFSNGfjxjuUJ.
./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/include/boost/gil/virtual_locator.hpp./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/include/boost/python/pure_virtual.hpp./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/include/boost/type_traits/has_virtual_destructor.hpp./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/include/boost/type_traits/is_virtual_base_of.hpp./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/include/nacl-mounts/base/irt_syscalls.h./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/share/doc/ImageMagick-6.5.4/images/t-shirt.png./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/share/doc/ImageMagick-6.5.4/www/t-shirt.html./pepper_18/toolchain/linux_x86_newlib/x86_64-nacl/include/irt_ppapi.h./pepper_18/toolchain/linux_x86_newlib/x86_64-nacl/include/irt.h./pepper_18/toolchain/linux_x86_glibc/x86_64-nacl/include/irt_ppapi.h./pepper_18/toolchain/linux_x86_glibc/x86_64-nacl/include/irt.h
These are the only files with "irt" in the name:
./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/include/boost/gil/virtual_locator.hpp./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/include/boost/python/pure_virtual.hpp./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/include/boost/type_traits/has_virtual_destructor.hpp./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/include/boost/type_traits/is_virtual_base_of.hpp./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/include/nacl-mounts/base/irt_syscalls.h./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/share/doc/ImageMagick-6.5.4/images/t-shirt.png./pepper_18/toolchain/linux_x86_newlib/i686-nacl/usr/share/doc/ImageMagick-6.5.4/www/t-shirt.html./pepper_18/toolchain/linux_x86_newlib/x86_64-nacl/include/irt_ppapi.h./pepper_18/toolchain/linux_x86_newlib/x86_64-nacl/include/irt.h./pepper_18/toolchain/linux_x86_glibc/x86_64-nacl/include/irt_ppapi.h./pepper_18/toolchain/linux_x86_glibc/x86_64-nacl/include/irt.h
And there are no nexes outside of the examples.Since sel_ldr is distributed with the SDK, my presumption is that it's intended that we can use it. True?Mike.
On Sun, Apr 22, 2012 at 8:07 AM, Bennet Yee (余仕斌) wrote:
Add a -B flag with arg the path to the integrated runtime IRT which is untrusted code injected into the addr space that provides the stable ABI that libc etc uses. The path is, if you are building sell_ldr from the sources, something like scons-out/.. /something-irt/.../*irt.nexe. Not sure where it is in the SDK.
plz xqz tpos, rplyng by fone
On Apr 22, 2012 2:16 AM, "Mike Acton" wrote:
The pepper interfaces are implemented by proxying calls to the browser. Standalone sell_ldr won't be useful for that.Actually, I wasn't interested in the pepper interfaces. I'll try without them.I have some file conversion functions (stdin->stdout) that I'd like to distribute with nacl projects (for offline, development use) and rather than worry about what another dev might have installed or what OS they're on, I thought it'd be handier to just build those with nacl so I can be confident anyone can run.So... a new hello.c:#include <stdio.h>intmain( void ){printf("hello, world.");return (0);}This one also segfaults:~/nacl_sdk/pepper_18/tools/sel_ldr_x86_64 -f hello_world_x86_64.nexe[17871,1502443360:09:13:49.017232] Native Client module will be loaded at base address 0x00007fd700000000--As for the seg fault, it's probably because the IRT isn't being loaded. No need to worry about it -- when you test via the browser, that's taken care of.
So what do I need to do to "load the IRT"? (What is IRT?)
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/native-client-discuss/-/dFSNGfjxjuUJ.
To post to this group, send email to native-client-discuss@googlegroups.com.
To unsubscribe from this group, send email to native-client-discuss+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/native-client-discuss?hl=en.
--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To post to this group, send email to native-client-discuss@googlegroups.com.
To unsubscribe from this group, send email to native-client-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/native-client-discuss/-/suwigpwYF7sJ.
To post to this group, send email to native-cli...@googlegroups.com.
To unsubscribe from this group, send email to native-client-di...@googlegroups.com.
Add a -B flag with arg the path to the integrated runtime IRT which is untrusted code injected into the addr space that provides the stable ABI that libc etc uses. The path is, if you are building sell_ldr from the sources, something like scons-out/.. /something-irt/.../*irt.nexe. Not sure where it is in the SDK.
plz xqz tpos, rplyng by fone