mirror of
				https://gitlab.alpinelinux.org/alpine/aports.git
				synced 2025-10-31 08:21:49 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| diff --git a/examples/writer/writer.cpp b/examples/writer/writer.cpp
 | |
| index 3b3e8b6..62e5592 100644
 | |
| --- a/examples/writer/writer.cpp
 | |
| +++ b/examples/writer/writer.cpp
 | |
| @@ -39,8 +39,8 @@ THE SOFTWARE.
 | |
|  using namespace ELFIO;
 | |
|  
 | |
|  const Elf64_Addr CODE_ADDR = 0x00401000;
 | |
| -const Elf_Xword  PAGE_SIZE = 0x1000;
 | |
| -const Elf64_Addr DATA_ADDR = CODE_ADDR + PAGE_SIZE;
 | |
| +const Elf_Xword  pagesize = 0x1000;
 | |
| +const Elf64_Addr DATA_ADDR = CODE_ADDR + pagesize;
 | |
|  
 | |
|  int main( void )
 | |
|  {
 | |
| @@ -80,7 +80,7 @@ int main( void )
 | |
|      text_seg->set_virtual_address( CODE_ADDR );
 | |
|      text_seg->set_physical_address( CODE_ADDR );
 | |
|      text_seg->set_flags( PF_X | PF_R );
 | |
| -    text_seg->set_align( PAGE_SIZE );
 | |
| +    text_seg->set_align( pagesize );
 | |
|  
 | |
|      // Add code section into program segment
 | |
|      text_seg->add_section( text_sec, text_sec->get_addr_align() );
 | |
| @@ -103,7 +103,7 @@ int main( void )
 | |
|      data_seg->set_virtual_address( DATA_ADDR );
 | |
|      data_seg->set_physical_address( DATA_ADDR );
 | |
|      data_seg->set_flags( PF_W | PF_R );
 | |
| -    data_seg->set_align( PAGE_SIZE );
 | |
| +    data_seg->set_align( pagesize );
 | |
|  
 | |
|      // Add code section into program segment
 | |
|      data_seg->add_section( data_sec, data_sec->get_addr_align() );
 |